From e0fdec22052b3d00b7bcfcf2e851731d690fc876 Mon Sep 17 00:00:00 2001
From: Michael McKenzie
Date: Tue, 19 Jul 2016 09:57:58 +0100
Subject: [PATCH 01/81] Changing hitch signature to match documentation
---
dojo/dojo.d.ts | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/dojo/dojo.d.ts b/dojo/dojo.d.ts
index bf3258a14a..687dba4cf7 100644
--- a/dojo/dojo.d.ts
+++ b/dojo/dojo.d.ts
@@ -5617,7 +5617,7 @@ declare namespace dojo {
* @param scope The scope to use when method executes. If method is a string,scope is also the object containing method.
* @param method A function to be hitched to scope, or the name of the method inscope to be hitched.
*/
- hitch(scope: Object, method: Function): any;
+ hitch(scope: Object, method: (...args: any[]) => any): any;
/**
* Returns a function that will only ever execute in the a given scope.
* This allows for easy use of object member functions
@@ -5631,7 +5631,7 @@ declare namespace dojo {
* @param scope The scope to use when method executes. If method is a string,scope is also the object containing method.
* @param method A function to be hitched to scope, or the name of the method inscope to be hitched.
*/
- hitch(scope: Object, method: String[]): any;
+ hitch(scope: Object, method: string): any;
/**
* Returns true if it is a built-in function or some other kind of
* oddball that should report as a function but doesn't
From 5cca8b39b92d6d408205edabd827e80caae73282 Mon Sep 17 00:00:00 2001
From: Michael McKenzie
Date: Tue, 19 Jul 2016 11:16:55 +0100
Subject: [PATCH 02/81] Changing hitch signature to match documentation
---
dojo/dojo.d.ts | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/dojo/dojo.d.ts b/dojo/dojo.d.ts
index 687dba4cf7..8a566a46f5 100644
--- a/dojo/dojo.d.ts
+++ b/dojo/dojo.d.ts
@@ -5617,7 +5617,7 @@ declare namespace dojo {
* @param scope The scope to use when method executes. If method is a string,scope is also the object containing method.
* @param method A function to be hitched to scope, or the name of the method inscope to be hitched.
*/
- hitch(scope: Object, method: (...args: any[]) => any): any;
+ hitch(scope: Object, method: (...args: any[]) => any, ...args: any[]): any;
/**
* Returns a function that will only ever execute in the a given scope.
* This allows for easy use of object member functions
@@ -5631,7 +5631,7 @@ declare namespace dojo {
* @param scope The scope to use when method executes. If method is a string,scope is also the object containing method.
* @param method A function to be hitched to scope, or the name of the method inscope to be hitched.
*/
- hitch(scope: Object, method: string): any;
+ hitch(scope: Object, method: string, ...args: any[]): any;
/**
* Returns true if it is a built-in function or some other kind of
* oddball that should report as a function but doesn't
From cdfb764333a69c177fa59837d92a98b03f564538 Mon Sep 17 00:00:00 2001
From: Michael McKenzie
Date: Tue, 19 Jul 2016 11:40:06 +0100
Subject: [PATCH 03/81] Changing dojo/_base/lang mixin signature to match
documentation
---
dojo/dojo.d.ts | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dojo/dojo.d.ts b/dojo/dojo.d.ts
index 8a566a46f5..cddc6445bb 100644
--- a/dojo/dojo.d.ts
+++ b/dojo/dojo.d.ts
@@ -5686,7 +5686,7 @@ declare namespace dojo {
* @param dest The object to which to copy/add all properties contained in source. If dest is falsy, thena new object is manufactured before copying/adding properties begins.
* @param sources One of more objects from which to draw all properties to copy into dest. sources are processedleft-to-right and if more than one of these objects contain the same property name, the right-mostvalue "wins".
*/
- mixin(dest: Object, sources: Object[]): Object;
+ mixin(dest: Object, ...sources: Object[]): Object;
/**
* similar to hitch() except that the scope object is left to be
* whatever the execution context eventually becomes.
From 9330e507270fb5e5b70e832bc65821efbf478b7c Mon Sep 17 00:00:00 2001
From: Michael McKenzie
Date: Tue, 19 Jul 2016 11:46:37 +0100
Subject: [PATCH 04/81] Revert "Changing dojo/_base/lang mixin signature to
match documentation"
This reverts commit cdfb764333a69c177fa59837d92a98b03f564538.
---
dojo/dojo.d.ts | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dojo/dojo.d.ts b/dojo/dojo.d.ts
index cddc6445bb..8a566a46f5 100644
--- a/dojo/dojo.d.ts
+++ b/dojo/dojo.d.ts
@@ -5686,7 +5686,7 @@ declare namespace dojo {
* @param dest The object to which to copy/add all properties contained in source. If dest is falsy, thena new object is manufactured before copying/adding properties begins.
* @param sources One of more objects from which to draw all properties to copy into dest. sources are processedleft-to-right and if more than one of these objects contain the same property name, the right-mostvalue "wins".
*/
- mixin(dest: Object, ...sources: Object[]): Object;
+ mixin(dest: Object, sources: Object[]): Object;
/**
* similar to hitch() except that the scope object is left to be
* whatever the execution context eventually becomes.
From 4be5e34492bde28df4b2a2569844bd90ae1871a2 Mon Sep 17 00:00:00 2001
From: Michael McKenzie
Date: Thu, 21 Jul 2016 14:26:28 +0100
Subject: [PATCH 05/81] Changing djit.Destroyable.own signature to match
documentation and implmentation
---
dojo/dijit.d.ts | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dojo/dijit.d.ts b/dojo/dijit.d.ts
index 8d3e99b6b5..29abf02211 100644
--- a/dojo/dijit.d.ts
+++ b/dojo/dijit.d.ts
@@ -1606,7 +1606,7 @@ declare module dijit {
* already removed/destroyed manually.
*
*/
- own(): any;
+ own(...args: any[]): any[];
/**
* Place this widget somewhere in the DOM based
* on standard domConstruct.place() conventions.
From 8de2997128443fbde32d9b04f7af78cd0c8c9593 Mon Sep 17 00:00:00 2001
From: Leon Yu
Date: Sat, 23 Jul 2016 22:41:11 -0400
Subject: [PATCH 06/81] Fix form-data for ES6 module (#9892)
---
form-data/form-data-tests.ts | 137 +++++++++++++++++++++++++++++++++--
form-data/form-data.d.ts | 27 ++++---
request/request-tests.ts | 22 +++---
request/request.d.ts | 4 +-
4 files changed, 163 insertions(+), 27 deletions(-)
diff --git a/form-data/form-data-tests.ts b/form-data/form-data-tests.ts
index 641a368749..180986ed99 100644
--- a/form-data/form-data-tests.ts
+++ b/form-data/form-data-tests.ts
@@ -1,8 +1,135 @@
///
+///
+///
+///
+import FormData = require('form-data');
+import fs = require('fs');
+import http = require('http');
+import request = require('request');
-import formData = require('form-data');
+import * as ImportUsingES6Syntax from 'form-data';
-var value: any;
-var fd = new formData.FormData();
-var obj: Object = fd.getHeaders();
-value = fd.pipe(value);
+() => {
+ var form = new FormData();
+ form.append('my_field', 'my value');
+ form.append('my_buffer', new Buffer(10));
+ form.append('my_file', fs.createReadStream('/foo/bar.jpg'));
+}
+
+() => {
+ var form = new FormData();
+
+ http.request('http://nodejs.org/images/logo.png', function (response) {
+ form.append('my_field', 'my value');
+ form.append('my_buffer', new Buffer(10));
+ form.append('my_logo', response);
+ });
+}
+
+() => {
+ var form = new FormData();
+
+ form.append('my_field', 'my value');
+ form.append('my_buffer', new Buffer(10));
+ form.append('my_logo', request('http://nodejs.org/images/logo.png'));
+}
+
+() => {
+ var form = new FormData();
+ form.submit('http://example.org/', function (err, res) {
+ // res – response object (http.IncomingMessage) //
+ res.resume();
+ });
+}
+
+
+() => {
+ var form = new FormData();
+ var request = http.request({
+ method: 'post',
+ host: 'example.org',
+ path: '/upload',
+ headers: form.getHeaders()
+ });
+
+ form.pipe(request);
+
+ request.on('response', function (res: any) {
+ console.log(res.statusCode);
+ });
+}
+
+
+() => {
+ var form = new FormData();
+ form.submit('example.org/upload', function (err, res) {
+ console.log(res.statusCode);
+ });
+}
+
+() => {
+ var CRLF = '\r\n';
+ var form = new FormData();
+ var buffer = new Buffer('');
+
+ var options = {
+ header: CRLF + '--' + form.getBoundary() + CRLF + 'X-Custom-Header: 123' + CRLF + CRLF,
+ knownLength: 1
+ };
+
+ form.append('my_buffer', buffer, options);
+
+ form.submit('http://example.com/', function (err, res) {
+ if (err) throw err;
+ console.log('Done');
+ });
+}
+
+() => {
+ var form = new FormData();
+ form.submit({
+ host: 'example.com',
+ path: '/probably.php?extra=params',
+ auth: 'username:password'
+ }, function (err, res) {
+ console.log(res.statusCode);
+ });
+}
+
+() => {
+ var form = new FormData();
+ form.submit({
+ host: 'example.com',
+ path: '/surelynot.php',
+ headers: { 'x-test-header': 'test-header-value' }
+ }, function (err, res) {
+ console.log(res.statusCode);
+ });
+}
+
+() => {
+ var formData = {
+ my_field: 'my_value',
+ my_file: fs.createReadStream(__dirname + '/unicycle.jpg'),
+ };
+
+ request.post({ url: 'http://service.com/upload', formData: formData }, function (err, httpResponse, body) {
+ if (err) {
+ return console.error('upload failed:', err);
+ }
+ console.log('Upload successful! Server responded with:', body);
+ });
+}
+
+() => {
+ var form = new FormData();
+
+ form.append('a', 1);
+
+ fetch('http://example.com', { method: 'POST', body: form })
+ .then(function (res) {
+ return res.json();
+ }).then(function (json) {
+ console.log(json);
+ });
+}
diff --git a/form-data/form-data.d.ts b/form-data/form-data.d.ts
index f3a19b16f7..e285d774af 100644
--- a/form-data/form-data.d.ts
+++ b/form-data/form-data.d.ts
@@ -1,16 +1,25 @@
// Type definitions for form-data
// Project: https://github.com/felixge/node-form-data
-// Definitions by: Carlos Ballesteros Velasco
+// Definitions by: Carlos Ballesteros Velasco , Leon Yu
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// Imported from: https://github.com/soywiz/typescript-node-definitions/form-data.d.ts
declare module "form-data" {
- export class FormData {
- append(key: string, value: any, options?: any): FormData;
- getHeaders(): Object;
- // TODO expand pipe
- pipe(to: any): any;
- submit(params: string|Object, callback: (error: any, response: any) => void): any;
- }
-}
+ class FormData {
+ append(key: string, value: any, options?: any): void;
+ getHeaders(): FormData.Dictionary;
+ // TODO expand pipe
+ pipe(to: any): any;
+ submit(params: string | Object, callback: (error: any, response: any) => void): any;
+ getBoundary(): string;
+ }
+
+ namespace FormData {
+ interface Dictionary {
+ [key: string]: T;
+ }
+ }
+
+ export = FormData;
+}
\ No newline at end of file
diff --git a/request/request-tests.ts b/request/request-tests.ts
index 6efeb63c54..1deeb1dff9 100644
--- a/request/request-tests.ts
+++ b/request/request-tests.ts
@@ -3,8 +3,8 @@
import request = require('request');
import http = require('http');
import stream = require('stream');
-import formData = require('form-data');
import fs = require('fs');
+import FormData = require('form-data');
var value: any;
var str: string;
@@ -21,7 +21,7 @@ var headers: {[key: string]: string};
var agent: http.Agent;
var write: stream.Writable;
var req: request.Request;
-var form1: formData.FormData;
+var form1: FormData;
var bodyArr: request.RequestPart[] = [{
body: value
@@ -92,7 +92,7 @@ var options: request.Options = {
qs: obj,
json: value,
multipart: value,
- agent: new http.Agent(),
+ agent: new http.Agent(),
agentOptions: value,
agentClass: value,
forever: value,
@@ -243,14 +243,14 @@ request
console.log(response.headers['content-type']); // 'image/png'
})
.pipe(request.put('http://mysite.com/img.png'));
-
+
request
.get('http://mysite.com/doodle.png')
.on('error', function(err: any) {
console.log(err);
})
.pipe(fs.createWriteStream('doodle.png'));
-
+
http.createServer(function (req, resp) {
if (req.url === '/doodle.png') {
if (req.method === 'PUT') {
@@ -362,7 +362,7 @@ request({
}
console.log('Upload successful! Server responded with:', body);
});
-
+
request.get('http://some.server.com/').auth('username', 'password', false);
// or
request.get('http://some.server.com/', {
@@ -452,8 +452,8 @@ request.post({url:url, oauth:oauth}, function (e, r, body) {
, token_secret: perm_data.oauth_token_secret
};
var url = 'https://api.twitter.com/1.1/users/show.json';
- var query = {
- screen_name: perm_data.screen_name,
+ var query = {
+ screen_name: perm_data.screen_name,
user_id: perm_data.user_id
};
request.get({url:url, oauth:oauth, qs:query, json:true}, function (e, r, user) {
@@ -540,7 +540,7 @@ request({
}
}
});
-
+
//requests using baseRequest() will set the 'x-token' header
var baseRequest = request.defaults({
headers: {'x-token': 'my-token'}
@@ -593,7 +593,7 @@ var rand = Math.floor(Math.random()*100000000).toString();
}
}
);
-
+
request(
{ method: 'GET'
, uri: 'http://www.google.com'
@@ -615,7 +615,7 @@ request(
console.log('received ' + data.length + ' bytes of compressed data')
})
});
-
+
var requestWithJar = request.defaults({jar: true})
requestWithJar('http://www.google.com', function () {
requestWithJar('http://images.google.com');
diff --git a/request/request.d.ts b/request/request.d.ts
index 547ee625de..11375b30da 100644
--- a/request/request.d.ts
+++ b/request/request.d.ts
@@ -12,9 +12,9 @@ declare module 'request' {
import stream = require('stream');
import http = require('http');
import https = require('https');
- import FormData = require('form-data');
import url = require('url');
import fs = require('fs');
+ import FormData = require('form-data');
namespace request {
export interface RequestAPI
Date: Sun, 24 Jul 2016 04:42:33 +0200
Subject: [PATCH 07/81] Fixed dozens of errors in the koa v2.x typings (#9920)
---
koa/koa.d.ts | 275 +++++++++++++++++++++++++++++----------------------
1 file changed, 158 insertions(+), 117 deletions(-)
diff --git a/koa/koa.d.ts b/koa/koa.d.ts
index b005067b1f..1356ffdb0e 100644
--- a/koa/koa.d.ts
+++ b/koa/koa.d.ts
@@ -13,129 +13,170 @@
}
=============================================== */
-///
+///
+///
declare module "koa" {
- import { EventEmitter } from "events";
- import * as http from "http";
- import * as net from "net";
+ import { EventEmitter } from "events";
+ import * as cookies from "cookies";
+ import * as http from "http";
+ import * as net from "net";
- namespace Koa {
- export interface Context extends Request, Response {
- body?: any;
- request?: Request;
- response?: Response;
- originalUrl?: string;
- state?: any;
- name?: string;
- cookies?: any;
- writable?: Boolean;
- respond?: Boolean;
- app?: Koa;
- req?: http.IncomingMessage;
- res?: http.ServerResponse;
+ namespace Koa {
+ export interface Context extends Request, Response {
+ app: Koa;
+ req: http.IncomingMessage;
+ res: http.ServerResponse;
+ request: Request;
+ response: Response;
+
+ cookies: cookies.ICookies;
+ originalUrl: string;
+ state: any;
+
+ name?: string;
+ respond?: boolean;
+
+ assert(test: any, ...args: any[]): void;
+ onerror(err?: any): void;
+ throw(...args: any[]): void;
+
+ toJSON(): any;
+ inspect(): any;
+ }
+
+ export interface Request {
+ app: Koa;
+ req: http.IncomingMessage;
+ res: http.ServerResponse;
+ ctx: Context;
+ response: Response;
+
+ fresh: boolean;
+ header: any;
+ headers: any;
+ host: string;
+ hostname: string;
+ href: string;
+ idempotent: boolean;
+ ip: string;
+ ips: string[];
+ method: string;
+ origin: string;
+ originalUrl: string;
+ path: string;
+ protocol: string;
+ query: any;
+ querystring: string;
+ search: string;
+ secure: boolean;
+ socket: net.Socket;
+ stale: boolean;
+ subdomains: string[];
+ type: string;
+ url: string;
+
+ charset?: string;
+ length?: number;
+
+ accepts(): string[];
+ accepts(arg: string): void | string;
+ accepts(arg: string[]): void | string;
+ accepts(...args: string[]): void | string;
+ acceptsCharsets(): string[];
+ acceptsCharsets(arg: string): void | string;
+ acceptsCharsets(arg: string[]): void | string;
+ acceptsCharsets(...args: string[]): void | string;
+ acceptsEncodings(): string[];
+ acceptsEncodings(arg: string): void | string;
+ acceptsEncodings(arg: string[]): void | string;
+ acceptsEncodings(...args: string[]): void | string;
+ acceptsLanguages(): string[];
+ acceptsLanguages(arg: string): void | string;
+ acceptsLanguages(arg: string[]): void | string;
+ acceptsLanguages(...args: string[]): void | string;
+ get(field: string): string;
+ is(): string[];
+ is(arg: string): void | string;
+ is(arg: string[]): void | string;
+ is(...args: string[]): void | string;
+
+ toJSON(): any;
+ inspect(): any;
+ }
+
+ export interface Response {
+ app: Koa;
+ req: http.IncomingMessage;
+ res: http.ServerResponse;
+ ctx: Context;
+ request: Request;
+
+ body: any;
+ etag: string;
+ header: any;
+ headers: any;
+ headerSent: boolean;
+ lastModified: Date;
+ message: string;
+ socket: net.Socket;
+ status: number;
+ type: string;
+ writable: boolean;
+
+ charset?: string;
+ length?: number;
+
+ append(field: string, val: string | string[]): void;
+ attachment(filename?: string): void;
+ get(field: string): string;
+ is(): string[];
+ is(arg: string): void | string;
+ is(arg: string[]): void | string;
+ is(...args: string[]): void | string;
+ redirect(url: string, alt?: string): void;
+ remove(field: string): void;
+ set(field: string, val: string | string[]): void;
+ set(field: any): void;
+ vary(field: string): void;
+
+ toJSON(): any;
+ inspect(): any;
+ }
+ }
+
+ class Koa extends EventEmitter {
+ context: Koa.Context;
+ env: string;
+ keys: string[];
+ proxy: boolean;
+ request: Koa.Request;
+ response: Koa.Response;
+ server: http.Server;
+ silent: boolean;
+ subdomainOffset: number;
+
+ constructor();
+
+ // From node.d.ts
+ listen(port: number, hostname?: string, backlog?: number, listeningListener?: Function): http.Server;
+ listen(port: number, hostname?: string, listeningListener?: Function): http.Server;
+ listen(port: number, backlog?: number, listeningListener?: Function): http.Server;
+ listen(port: number, listeningListener?: Function): http.Server;
+ listen(path: string, backlog?: number, listeningListener?: Function): http.Server;
+ listen(path: string, listeningListener?: Function): http.Server;
+ listen(handle: any, backlog?: number, listeningListener?: Function): http.Server;
+ listen(handle: any, listeningListener?: Function): http.Server;
+ listen(options: net.ListenOptions, listeningListener?: Function): http.Server;
+
+ callback(): (req: http.IncomingMessage, res: http.ServerResponse) => void;
onerror(err: any): void;
+ use(middleware: (ctx: Koa.Context, next: () => Promise) => any): Koa;
+
toJSON(): any;
inspect(): any;
- throw(code?: any, message?: any): void;
- assert(test: any, status: number, message: string): void;
}
- export interface Request {
- _querycache?: string;
- app?: Koa;
- req?: http.IncomingMessage;
- res?: http.ServerResponse;
- response?: Response;
- ctx?: Context;
- headers?: any;
- header?: any;
- method?: string;
- length?: any;
- url?: string;
- origin?: string;
- originalUrl?: string;
- href?: string;
- path?: string;
- querystring?: string;
- query?: any;
- search?: string;
- idempotent?: Boolean;
- socket?: net.Socket;
- protocol?: string;
- host?: string;
- hostname?: string;
- fresh?: Boolean;
- stale?: Boolean;
- charset?: string;
- secure?: Boolean;
- ips?: Array;
- ip?: string;
- subdomains?: Array;
- accept?: any;
- type?: string;
- accepts?: () => any;
- acceptsEncodings?: () => any;
- acceptsCharsets?: () => any;
- acceptsLanguages?: () => any;
- is?: (types: any) => any;
- toJSON?: () => any;
- inspect?: () => any;
- get?: (field: string) => string;
- }
-
- export interface Response {
- _body?: any;
- _explicitStatus?: Boolean;
- app?: Koa;
- res?: http.ServerResponse;
- req?: http.IncomingMessage;
- ctx?: Context;
- request?: Request;
- socket?: net.Socket;
- header?: any;
- headers?: any;
- status?: number;
- message?: string;
- type?: string;
- body?: any;
- length?: any;
- headerSent?: Boolean;
- lastModified?: Date;
- etag?: string;
- writable?: Boolean;
- is?: (types: any) => any;
- redirect?: (url: string, alt: string) => void;
- attachment?: (filename?: string) => void;
- vary?: (field: string) => void;
- get?: (field: string) => string;
- set?: (field: any, val: any) => void;
- remove?: (field: string) => void;
- append?: (field: string, val: any) => void;
- toJSON?: () => any;
- inspect?: () => any;
- }
- }
-
- class Koa extends EventEmitter {
- keys: Array;
- subdomainOffset: number;
- proxy: Boolean;
- server: http.Server;
- env: string;
- context: Koa.Context;
- request: Koa.Request;
- response: Koa.Response;
- silent: Boolean;
- constructor();
- use(middleware: (ctx: Koa.Context, next: Function) => any): Koa;
- callback(): (req: http.IncomingMessage, res: http.ServerResponse) => void;
- listen(port: number, callback?: Function): http.Server;
- toJSON(): any;
- inspect(): any;
- onerror(err: any): void;
- }
-
- namespace Koa {}
- export = Koa;
+ namespace Koa {}
+ export = Koa;
}
From 76a755c0077e99fcf189e1d76745ebccec2e42e3 Mon Sep 17 00:00:00 2001
From: Mike Deverell
Date: Sat, 23 Jul 2016 22:44:18 -0400
Subject: [PATCH 08/81] Update/fix HammerJS typings (#9968)
* clarify and fix 'options' object types; Hammer.Manager requires an EventTarget, not HTMLElement
* fix RecognizerTuple type
---
hammerjs/hammerjs.d.ts | 71 ++++++++++++++++++++++++++++++------------
1 file changed, 51 insertions(+), 20 deletions(-)
diff --git a/hammerjs/hammerjs.d.ts b/hammerjs/hammerjs.d.ts
index bfc6e7cb4f..6b7cc7fb19 100644
--- a/hammerjs/hammerjs.d.ts
+++ b/hammerjs/hammerjs.d.ts
@@ -1,4 +1,4 @@
-// Type definitions for Hammer.js 2.0.4
+// Type definitions for Hammer.js 2.0.8
// Project: http://hammerjs.github.io/
// Definitions by: Philip Bulley , Han Lin Yap
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
@@ -11,7 +11,7 @@ declare module "hammerjs" {
interface HammerStatic
{
- new( element:HTMLElement | SVGElement, options?:any ): HammerManager;
+ new( element:HTMLElement | SVGElement, options?:HammerOptions ): HammerManager;
defaults:HammerDefaults;
@@ -68,16 +68,22 @@ interface HammerStatic
prefixed( obj:any, property:string ):string;
}
-interface HammerDefaults
+type RecognizerTuple =
+ [RecognizerStatic]
+ | [RecognizerStatic, RecognizerOptions]
+ | [RecognizerStatic, RecognizerOptions, string | string[]]
+ | [RecognizerStatic, RecognizerOptions, string | string[], (string | Recognizer) | (string | Recognizer)[]];
+
+interface HammerDefaults extends HammerOptions
{
domEvents:boolean;
enable:boolean;
- preset:any[];
+ preset:RecognizerTuple[];
touchAction:string;
cssProps:CssProps;
- inputClass():void;
- inputTarget():void;
+ inputClass:() => void;
+ inputTarget:EventTarget;
}
interface CssProps
@@ -90,13 +96,25 @@ interface CssProps
userSelect:string;
}
-interface HammerOptions extends HammerDefaults
+interface HammerOptions
{
+ cssProps?:CssProps;
+ domEvents?:boolean;
+ enable?:boolean | ((manager: HammerManager) => boolean);
+ preset?:RecognizerTuple[];
+ touchAction?:string;
+ recognizers?:RecognizerTuple[];
+ inputClass?:() => void;
+ inputTarget?:EventTarget;
}
interface HammerManagerConstructor {
- new( element:HTMLElement, options?:any ):HammerManager;
+ new( element:EventTarget, options?:HammerOptions ):HammerManager;
+}
+
+interface HammerListener {
+ (event:HammerInput): void
}
interface HammerManager
@@ -109,8 +127,8 @@ interface HammerManager
emit( event:string, data:any ):void;
get( recogniser:Recognizer ):Recognizer;
get( recogniser:string ):Recognizer;
- off( events:string, handler?:( event:HammerInput ) => void ):void;
- on( events:string, handler:( event:HammerInput ) => void ):void;
+ off( events:string, handler?:HammerListener ):void;
+ on( events:string, handler:HammerListener ):void;
recognize( inputData:any ):void;
remove( recogniser:Recognizer ):HammerManager;
remove( recogniser:string ):HammerManager;
@@ -157,7 +175,7 @@ declare class HammerInput
direction:number;
/** Direction moved from it's starting point. Matches the DIRECTION constants. */
- offsetDirection:string;
+ offsetDirection:number;
/** Scaling that has been done when multi-touch. 1 on a single touch. */
scale:number;
@@ -221,9 +239,22 @@ declare class TouchMouseInput extends HammerInput
constructor( manager:HammerManager, callback:Function );
}
+interface RecognizerOptions {
+ direction?: number;
+ enable?: boolean | ((recognizer: Recognizer, inputData: HammerInput) => boolean);
+ event?: string;
+ interval?: number;
+ pointers?: number;
+ posThreshold?: number;
+ taps?: number
+ threshold?: number;
+ time?: number;
+ velocity?: number;
+}
+
interface RecognizerStatic
{
- new( options?:any ):Recognizer;
+ new( options?:RecognizerOptions ):Recognizer;
}
interface Recognizer
@@ -246,7 +277,7 @@ interface Recognizer
requireFailure( otherRecognizer:Recognizer ):Recognizer;
requireFailure( otherRecognizer:string ):Recognizer;
reset():void;
- set( options?:any ):Recognizer;
+ set( options?:RecognizerOptions ):Recognizer;
tryEmit( input:HammerInput ):void;
}
@@ -258,12 +289,12 @@ interface AttrRecognizerStatic
interface AttrRecognizer extends Recognizer
{
- new( options?:any ):AttrRecognizer;
+ new( options?:RecognizerOptions ):AttrRecognizer;
}
interface PanRecognizerStatic
{
- new( options?:any ):PanRecognizer;
+ new( options?:RecognizerOptions ):PanRecognizer;
}
interface PanRecognizer extends AttrRecognizer
@@ -272,7 +303,7 @@ interface PanRecognizer extends AttrRecognizer
interface PinchRecognizerStatic
{
- new( options?:any ):PinchRecognizer;
+ new( options?:RecognizerOptions ):PinchRecognizer;
}
interface PinchRecognizer extends AttrRecognizer
@@ -281,7 +312,7 @@ interface PinchRecognizer extends AttrRecognizer
interface PressRecognizerStatic
{
- new( options?:any ):PressRecognizer;
+ new( options?:RecognizerOptions ):PressRecognizer;
}
interface PressRecognizer extends AttrRecognizer
@@ -290,7 +321,7 @@ interface PressRecognizer extends AttrRecognizer
interface RotateRecognizerStatic
{
- new( options?:any ):RotateRecognizer;
+ new( options?:RecognizerOptions ):RotateRecognizer;
}
interface RotateRecognizer extends AttrRecognizer
@@ -299,7 +330,7 @@ interface RotateRecognizer extends AttrRecognizer
interface SwipeRecognizerStatic
{
- new( options?:any ):SwipeRecognizer;
+ new( options?:RecognizerOptions ):SwipeRecognizer;
}
interface SwipeRecognizer extends AttrRecognizer
@@ -308,7 +339,7 @@ interface SwipeRecognizer extends AttrRecognizer
interface TapRecognizerStatic
{
- new( options?:any ):TapRecognizer;
+ new( options?:RecognizerOptions ):TapRecognizer;
}
interface TapRecognizer extends AttrRecognizer
From 71f47713ff9044c2f722562cc59f231055d1e03e Mon Sep 17 00:00:00 2001
From: David Poetzsch-Heffter
Date: Sun, 24 Jul 2016 04:45:08 +0200
Subject: [PATCH 09/81] Parse fixes (#9987)
* Added overriden version of extend in Parse.User
* added type declaration of Parse.Promise.when with varargs
* making Promise compatible with IPromise
* fixed when: it is enough to have IPromise here
* added Parse.Config class
* fixed save/saveAll signatures
* any object is allowed as function response
* more precise signature for Parse.Object#find
* request has a property object in beforeSave triggers
* fixed types of trigger request & response objects
* better fetch signatures
* fixed typing for JobStatus
* ErrorCode enum needs to be inlined in order to not create a dependency on the type definition
* fixed return types of Parse.Promise#then
* fixed typing of Parse.Promise.error
* added static function Object.registerSubclass
* fixed signature of Object#save
* removed wrongly typed signatures; User inherits the correcrt ones from Object
* added signature for Object#createAt and Object#updatedAt
* javaScriptKey is optional according to https://github.com/ParsePlatform/Parse-SDK-JS/blob/v1.8.5/src/Parse.js
* added class Session with methods typed according to https://parse.com/docs/js/api/classes/Parse.Session.html
---
parse/parse.d.ts | 89 ++++++++++++++++++++++++++++++++----------------
1 file changed, 59 insertions(+), 30 deletions(-)
diff --git a/parse/parse.d.ts b/parse/parse.d.ts
index e624b2ebcd..4035019c8d 100644
--- a/parse/parse.d.ts
+++ b/parse/parse.d.ts
@@ -67,29 +67,30 @@ declare namespace Parse {
interface IPromise {
- then(resolvedCallback: (value: T) => IPromise, rejectedCallback?: (reason: any) => IPromise): IPromise;
- then(resolvedCallback: (value: T) => U, rejectedCallback?: (reason: any) => IPromise): IPromise;
- then(resolvedCallback: (value: T) => U, rejectedCallback?: (reason: any) => U): IPromise;
+ then(resolvedCallback: (...values: T[]) => IPromise, rejectedCallback?: (reason: any) => IPromise): IPromise;
+ then(resolvedCallback: (...values: T[]) => U, rejectedCallback?: (reason: any) => IPromise): IPromise;
+ then(resolvedCallback: (...values: T[]) => U, rejectedCallback?: (reason: any) => U): IPromise;
}
- class Promise {
+ class Promise implements IPromise {
static as(resolvedValue: U): Promise;
- static error(error: U): Promise;
+ static error(error: U): Promise;
static is(possiblePromise: any): Boolean;
- static when(promises: Promise[]): Promise;
+ static when(promises: IPromise[]): Promise;
+ static when(...promises: IPromise[]): Promise;
always(callback: Function): Promise;
done(callback: Function): Promise;
fail(callback: Function): Promise;
reject(error: any): void;
resolve(result: any): void;
- then(resolvedCallback: (value: T) => Promise,
- rejectedCallback?: (reason: any) => Promise): IPromise;
- then(resolvedCallback: (value: T) => U,
- rejectedCallback?: (reason: any) => IPromise): IPromise;
- then(resolvedCallback: (value: T) => U,
- rejectedCallback?: (reason: any) => U): IPromise;
+ then(resolvedCallback: (...values: T[]) => IPromise,
+ rejectedCallback?: (reason: any) => IPromise): IPromise;
+ then(resolvedCallback: (...values: T[]) => U,
+ rejectedCallback?: (reason: any) => IPromise): IPromise;
+ then(resolvedCallback: (...values: T[]) => U,
+ rejectedCallback?: (reason: any) => U): IPromise;
}
interface IBaseObject {
@@ -306,7 +307,9 @@ declare namespace Parse {
*/
class Object extends BaseObject {
- id: any;
+ id: string;
+ createdAt: Date;
+ updatedAt: Date;
attributes: any;
cid: string;
changed: boolean;
@@ -319,7 +322,9 @@ declare namespace Parse {
static fetchAll(list: Object[], options: SuccessFailureOptions): Promise;
static fetchAllIfNeeded(list: Object[], options: SuccessFailureOptions): Promise;
static destroyAll(list: Object[], options?: Object.DestroyAllOptions): Promise;
- static saveAll(list: Object[], options?: Object.SaveAllOptions): Promise;
+ static saveAll(list: T[], options?: Object.SaveAllOptions): Promise;
+
+ static registerSubclass(className: string, clazz: new (options?: any) => T): void;
initialize(): void;
add(attr: string, item: any): Object;
@@ -333,7 +338,7 @@ declare namespace Parse {
dirtyKeys(): string[];
escape(attr: string): string;
existed(): boolean;
- fetch(options?: Object.FetchOptions): Promise;
+ fetch(options?: Object.FetchOptions): Promise;
get(attr: string): any;
getACL(): ACL;
has(attr: string): boolean;
@@ -345,7 +350,8 @@ declare namespace Parse {
previousAttributes(): any;
relation(attr: string): Relation;
remove(attr: string, item: any): any;
- save(options?: Object.SaveOptions, arg2?: any, arg3?: any): Promise;
+ save(attrs?: { [key: string]: any }, options?: Object.SaveOptions): Promise;
+ save(key: string, value: any, options?: Object.SaveOptions): Promise;
set(key: string, value: any, options?: Object.SetOptions): boolean;
setACL(acl: ACL, options?: SuccessFailureOptions): boolean;
unset(attr: string, options?: any): any;
@@ -587,7 +593,7 @@ declare namespace Parse {
endsWith(key: string, suffix: string): Query;
equalTo(key: string, value: any): Query;
exists(key: string): Query;
- find(options?: Query.FindOptions): Promise;
+ find(options?: Query.FindOptions): Promise;
first(options?: Query.FirstOptions): Promise;
get(objectId: string, options?: Query.GetOptions): Promise;
greaterThan(key: string, value: any): Query;
@@ -642,6 +648,21 @@ declare namespace Parse {
setName(name: string, options?: SuccessFailureOptions): any;
}
+ class Config extends Object {
+ static get(options?: SuccessFailureOptions): Promise;
+ static current(): Config;
+
+ get(attr: string): any;
+ escape(attr: string): any;
+ }
+
+ class Session extends Object {
+ static current(): Promise;
+
+ getSessionToken(): string;
+ isCurrentSessionRevocable(): boolean;
+ }
+
/**
* Routers map faux-URLs to actions, and fire events when routes are
* matched. Creating a new one sets its `routes` hash, if not set statically.
@@ -698,11 +719,10 @@ declare namespace Parse {
static allowCustomUserClass(isAllowed: boolean): void;
static become(sessionToken: string, options?: SuccessFailureOptions): Promise;
static requestPasswordReset(email: string, options?: SuccessFailureOptions): Promise;
+ static extend(protoProps?: any, classProps?: any): any;
signUp(attrs: any, options?: SuccessFailureOptions): Promise;
logIn(options?: SuccessFailureOptions): Promise;
- fetch(options?: SuccessFailureOptions): Promise;
- save(arg1: any, arg2: any, arg3: any): Promise;
authenticated(): boolean;
isCurrent(): boolean;
@@ -822,9 +842,9 @@ declare namespace Parse {
}
interface JobStatus {
- error?: Function;
- message?: Function;
- success?: Function;
+ error?: (response: any) => void;
+ message?: (response: any) => void;
+ success?: (response: any) => void;
}
interface FunctionRequest {
@@ -835,8 +855,8 @@ declare namespace Parse {
}
interface FunctionResponse {
- success?: (response: HttpResponse) => void;
- error?: (response: HttpResponse) => void;
+ success?: (response: any) => void;
+ error?: (response: any) => void;
}
interface Cookie {
@@ -845,12 +865,18 @@ declare namespace Parse {
value?: string;
}
- interface AfterSaveRequest extends FunctionRequest {}
+ interface SaveRequest extends FunctionRequest {
+ object: Object;
+ }
+
+ interface AfterSaveRequest extends SaveRequest {}
interface AfterDeleteRequest extends FunctionRequest {}
interface BeforeDeleteRequest extends FunctionRequest {}
interface BeforeDeleteResponse extends FunctionResponse {}
- interface BeforeSaveRequest extends FunctionRequest {}
- interface BeforeSaveResponse extends FunctionResponse {}
+ interface BeforeSaveRequest extends SaveRequest {}
+ interface BeforeSaveResponse extends FunctionResponse {
+ success?: () => void;
+ }
function afterDelete(arg1: any, func?: (request: AfterDeleteRequest) => void): void;
function afterSave(arg1: any, func?: (request: AfterSaveRequest) => void): void;
@@ -911,7 +937,10 @@ declare namespace Parse {
}
- enum ErrorCode {
+ /*
+ * We need to inline the codes in order to make compilation work without this type definition as dependency.
+ */
+ const enum ErrorCode {
OTHER_CAUSE = -1,
INTERNAL_SERVER_ERROR = 1,
@@ -1043,10 +1072,10 @@ declare namespace Parse {
* Call this method first to set up your authentication tokens for Parse.
* You can get your keys from the Data Browser on parse.com.
* @param {String} applicationId Your Parse Application ID.
- * @param {String} javaScriptKey Your Parse JavaScript Key.
+ * @param {String} javaScriptKey (optional) Your Parse JavaScript Key (Not needed for parse-server)
* @param {String} masterKey (optional) Your Parse Master Key. (Node.js only!)
*/
- function initialize(applicationId: string, javaScriptKey: string, masterKey?: string): void;
+ function initialize(applicationId: string, javaScriptKey?: string, masterKey?: string): void;
}
From 63f86fc0651c0cfa868a526c2bf53110c686bcc4 Mon Sep 17 00:00:00 2001
From: Thanh H
Date: Sat, 23 Jul 2016 22:57:56 -0400
Subject: [PATCH 10/81] Fix #8985 (#10098)
* Fix #8985
* Update definition of ITranslationTable to support namespace (#2433)
---
angular-translate/angular-translate.d.ts | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/angular-translate/angular-translate.d.ts b/angular-translate/angular-translate.d.ts
index 51946281ce..de7db4eb54 100644
--- a/angular-translate/angular-translate.d.ts
+++ b/angular-translate/angular-translate.d.ts
@@ -13,7 +13,7 @@ declare module "angular-translate" {
declare namespace angular.translate {
interface ITranslationTable {
- [key: string]: any;
+ [key: string]: string | ITranslationTable;
}
interface ILanguageKeyAlias {
@@ -96,7 +96,7 @@ declare namespace angular.translate {
storageKey(): string;
storageKey(key: string): void; // JeroMiya - the library should probably return ITranslateProvider but it doesn't here
useUrlLoader(url: string): ITranslateProvider;
- useStaticFilesLoader(options: IStaticFilesLoaderOptions): ITranslateProvider;
+ useStaticFilesLoader(options: IStaticFilesLoaderOptions | { files: IStaticFilesLoaderOptions[] }): ITranslateProvider;
useLoader(loaderFactory: string, options?: any): ITranslateProvider;
useLocalStorage(): ITranslateProvider;
useCookieStorage(): ITranslateProvider;
From b1bc0fa775a73477f52038fb74ddc4ae8708869f Mon Sep 17 00:00:00 2001
From: Paulo Cesar
Date: Sun, 24 Jul 2016 00:02:53 -0300
Subject: [PATCH 11/81] Jquery.payment (#10190)
* fix jquery.payment for new API and add tests
* add tests
* squash! fix jquery.payment for new API and add tests
---
jquery.payment/jquery.payment-tests.ts | 45 ++++++++++++++++++++++++++
jquery.payment/jquery.payment.d.ts | 19 +++++++----
2 files changed, 57 insertions(+), 7 deletions(-)
create mode 100644 jquery.payment/jquery.payment-tests.ts
diff --git a/jquery.payment/jquery.payment-tests.ts b/jquery.payment/jquery.payment-tests.ts
new file mode 100644
index 0000000000..6ef1c2154d
--- /dev/null
+++ b/jquery.payment/jquery.payment-tests.ts
@@ -0,0 +1,45 @@
+///
+///
+
+$.payment.cards.push({
+ // Card type, as returned by $.payment.cardType.
+ type: 'mastercard',
+ // Array of prefixes used to identify the card type.
+ patterns: [
+ 51, 52, 53, 54, 55,
+ 22, 23, 24, 25, 26, 27
+ ],
+ // Array of valid card number lengths.
+ length: [16],
+ // Array of valid card CVC lengths.
+ cvcLength: [3],
+ // Boolean indicating whether a valid card number should satisfy the Luhn check.
+ luhn: true,
+ // Regex used to format the card number. Each match is joined with a space.
+ format: /(\d{1,4})/g
+})
+
+$('[data-numeric]').payment('restrictNumeric');
+
+$.payment.validateCardNumber('4242 4242 4242 4242') === true; //=> true
+
+$.payment.validateCardExpiry('05', '20') === true; //=> true
+$.payment.validateCardExpiry('05', '2015') === true; //=> true
+$.payment.validateCardExpiry('05', '05') === true; //=> false
+
+$.payment.validateCardCVC('123') === true; //=> true
+$.payment.validateCardCVC('123', 'amex') === true; //=> true
+$.payment.validateCardCVC('1234', 'amex') === true; //=> true
+$.payment.validateCardCVC('12344') === false; //=> false
+
+$.payment.cardType('4242 4242 4242 4242') === 'visa'; //=> 'visa'
+
+$.payment.cardExpiryVal('03 / 2025') === {month: 3, year: 2025}; //=> {month: 3, year: 2025}
+$.payment.cardExpiryVal('05 / 04') === {month: 3, year: 2025}; //=> {month: 5, year: 2004}
+$('input.cc-exp').payment('cardExpiryVal') //=> {month: 4, year: 2020}
+
+var valid = $.payment.validateCardNumber($('input.cc-num').val());
+
+if (!valid) {
+ alert('Your card is not valid!');
+}
\ No newline at end of file
diff --git a/jquery.payment/jquery.payment.d.ts b/jquery.payment/jquery.payment.d.ts
index 61408d6ca9..1899eceaf4 100644
--- a/jquery.payment/jquery.payment.d.ts
+++ b/jquery.payment/jquery.payment.d.ts
@@ -77,33 +77,38 @@ declare namespace JQueryPayment {
/**
* Card type
*/
- type: string;
+ type?: string;
- /*
+ /**
* Regex used to identify the card type. For the best experience, this should be
* the shortest pattern that can guarantee the card is of a particular type.
*/
- pattern: RegExp;
+ pattern?: RegExp;
+
+ /**
+ * Array of prefixes used to identify the card type.
+ */
+ patterns?: number[];
/**
* Array of valid card number lengths.
*/
- length: number[];
+ length?: number[];
/**
* Array of valid card CVC lengths.
*/
- cvcLength: number[];
+ cvcLength?: number[];
/**
* Boolean indicating whether a valid card number should satisfy the Luhn check.
*/
- luhn: boolean;
+ luhn?: boolean;
/**
* Regex used to format the card number. Each match is joined with a space.
*/
- format: RegExp;
+ format?: RegExp;
}
}
From acf17c35f3f6d21658f275c02cd368871d32fbec Mon Sep 17 00:00:00 2001
From: NN
Date: Sun, 24 Jul 2016 06:08:35 +0300
Subject: [PATCH 12/81] onAuthRequired allows additional arguments. (#10200)
See:
https://developer.chrome.com/extensions/webRequest#type-OnAuthRequiredOptions
https://developer.mozilla.org/en-US/Add-ons/WebExtensions/API/webRequest/onAuthRequired
---
chrome/chrome.d.ts | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/chrome/chrome.d.ts b/chrome/chrome.d.ts
index bdd0271fca..efdfb5ce59 100644
--- a/chrome/chrome.d.ts
+++ b/chrome/chrome.d.ts
@@ -7336,7 +7336,9 @@ declare namespace chrome.webRequest {
interface WebRedirectionResponseEvent extends _WebResponseHeadersEvent {}
- interface WebAuthenticationChallengeEvent extends chrome.events.Event<(details: WebAuthenticationChallengeDetails, callback?: (response: BlockingResponse) => void) => void> {}
+ interface WebAuthenticationChallengeEvent extends chrome.events.Event<(details: WebAuthenticationChallengeDetails, callback?: (response: BlockingResponse) => void) => void> {
+ addListener(callback: (details: WebAuthenticationChallengeDetails) => void, filter?: RequestFilter, opt_extraInfoSpec?: string[]): void;
+ }
interface WebResponseErrorEvent extends _WebResponseHeadersEvent {}
From 52087dbaeef34185320ca5f11d93ff5d73735973 Mon Sep 17 00:00:00 2001
From: NN
Date: Sun, 24 Jul 2016 06:09:03 +0300
Subject: [PATCH 13/81] Add missing url property for all requests (#10201)
See documentation
https://developer.chrome.com/extensions/webRequest
https://developer.mozilla.org/en-US/Add-ons/WebExtensions/API/webRequest/
---
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 efdfb5ce59..577d07b526 100644
--- a/chrome/chrome.d.ts
+++ b/chrome/chrome.d.ts
@@ -7233,6 +7233,7 @@ declare namespace chrome.webRequest {
}
interface ResourceRequest {
+ url: string;
/** The ID of the request. Request IDs are unique within a browser session. As a result, they could be used to relate different events of the same request. */
requestId: string;
/** The value 0 indicates that the request happens in the main frame; a positive value indicates the ID of a subframe in which the request happens. If the document of a (sub-)frame is loaded (type is main_frame or sub_frame), frameId indicates the ID of this frame, not the ID of the outer frame. Frame IDs are unique within a tab. */
@@ -7251,7 +7252,6 @@ declare namespace chrome.webRequest {
}
interface WebRequestDetails extends ResourceRequest {
- url: string;
/** Standard HTTP method. */
method: string;
}
From 5e942d89e66a8ca8986a83fe5e1f4fb20029ddde Mon Sep 17 00:00:00 2001
From: NN
Date: Sun, 24 Jul 2016 06:09:20 +0300
Subject: [PATCH 14/81] Fix typo, schema => scheme (#10203)
See documentation https://developer.chrome.com/extensions/webRequest
---
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 577d07b526..75ec50afad 100644
--- a/chrome/chrome.d.ts
+++ b/chrome/chrome.d.ts
@@ -7304,7 +7304,7 @@ declare namespace chrome.webRequest {
interface WebAuthenticationChallengeDetails extends WebResponseHeadersDetails {
/** The authentication scheme, e.g. Basic or Digest. */
- schema: string;
+ scheme: string;
/** The authentication realm provided by the server, if there is one. */
realm?: string;
/** The server requesting authentication. */
From 96034d863bf11341d8ef5080eddb3b298b5eb74d Mon Sep 17 00:00:00 2001
From: Birk Skyum
Date: Sun, 24 Jul 2016 07:47:59 +0200
Subject: [PATCH 15/81] Update parse.d.ts (#10249)
Alter options for Cloud.run and Query.each
---
parse/parse.d.ts | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/parse/parse.d.ts b/parse/parse.d.ts
index 4035019c8d..825eedf386 100644
--- a/parse/parse.d.ts
+++ b/parse/parse.d.ts
@@ -25,6 +25,10 @@ declare namespace Parse {
interface SuccessFailureOptions extends SuccessOption, ErrorOption {
}
+
+ interface SessionTokenOption {
+ sessionToken?: string;
+ }
interface WaitOption {
/**
@@ -589,7 +593,7 @@ declare namespace Parse {
doesNotExist(key: string): Query;
doesNotMatchKeyInQuery(key: string, queryKey: string, query: Query): Query;
doesNotMatchQuery(key: string, query: Query): Query;
- each(callback: Function, options?: SuccessFailureOptions): Promise;
+ each(callback: Function, options?: Query.EachOptions): Promise;
endsWith(key: string, suffix: string): Query;
equalTo(key: string, value: any): Query;
exists(key: string): Query;
@@ -619,6 +623,7 @@ declare namespace Parse {
}
namespace Query {
+ interface EachOptions extends SuccessFailureOptions, UseMasterKeyOption { }
interface CountOptions extends SuccessFailureOptions, UseMasterKeyOption { }
interface FindOptions extends SuccessFailureOptions, UseMasterKeyOption { }
interface FirstOptions extends SuccessFailureOptions, UseMasterKeyOption { }
@@ -885,9 +890,11 @@ declare namespace Parse {
function define(name: string, func?: (request: FunctionRequest, response: FunctionResponse) => void): void;
function httpRequest(options: HTTPOptions): Promise;
function job(name: string, func?: (request: JobRequest, status: JobStatus) => void): HttpResponse;
- function run(name: string, data?: any, options?: SuccessFailureOptions): Promise;
+ function run(name: string, data?: any, options?: RunOptions): Promise;
function useMasterKey(): void;
+ interface RunOptions extends SuccessFailureOptions, UseMasterKeyOption, SessionTokenOption { }
+
/**
* To use this Cloud Module in Cloud Code, you must require 'buffer' in your JavaScript file.
*
From d9b96bdada46779594de26aa94333c9a5e5cd1a1 Mon Sep 17 00:00:00 2001
From: iclanton
Date: Sat, 23 Jul 2016 22:48:56 -0700
Subject: [PATCH 16/81] webpack-stream typings. (#10248)
---
webpack-stream/webpack-stream-tests.ts | 12 +++++++
webpack-stream/webpack-stream.d.ts | 48 ++++++++++++++++++++++++++
2 files changed, 60 insertions(+)
create mode 100644 webpack-stream/webpack-stream-tests.ts
create mode 100644 webpack-stream/webpack-stream.d.ts
diff --git a/webpack-stream/webpack-stream-tests.ts b/webpack-stream/webpack-stream-tests.ts
new file mode 100644
index 0000000000..bd57e1c735
--- /dev/null
+++ b/webpack-stream/webpack-stream-tests.ts
@@ -0,0 +1,12 @@
+///
+///
+
+import webpackStream = require("webpack-stream");
+import webpack = require("webpack");
+
+let output: NodeJS.ReadWriteStream;
+
+output = webpackStream();
+output = webpackStream({ entry: '' });
+output = webpackStream({ entry: '' }, webpack);
+output = webpackStream({ entry: '' }, webpack, (error: Error, stats: webpack.compiler.Stats) => { });
diff --git a/webpack-stream/webpack-stream.d.ts b/webpack-stream/webpack-stream.d.ts
new file mode 100644
index 0000000000..1a41fa491b
--- /dev/null
+++ b/webpack-stream/webpack-stream.d.ts
@@ -0,0 +1,48 @@
+// Type definitions for Combokeys v3.20.0
+// Project: https://github.com/shama/webpack-stream
+// Definitions by: Ian Clanton-Thuon
+// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
+
+///
+///
+
+declare module "webpack-stream" {
+ import webpack = require("webpack");
+
+ interface WebpackStreamStatic {
+ /**
+ * Run webpack with the default configuration.
+ */
+ (): NodeJS.ReadWriteStream;
+
+ /**
+ * Run webpack with the specified configuration.
+ *
+ * @param {config} Webpack configuration
+ */
+ (config: webpack.Configuration): NodeJS.ReadWriteStream;
+
+ /**
+ * Run webpack with the specified configuration and webpack instance
+ *
+ * @param {config} Webpack configuration
+ * @param {webpack} A webpack object
+ */
+ (config: webpack.Configuration, webpack: webpack.Webpack): NodeJS.ReadWriteStream;
+
+ /**
+ * Run webpack with the specified configuration and webpack instance
+ *
+ * @param {config} Webpack configuration
+ * @param {webpack} A webpack object
+ * @param {callback} A callback with the webpack stats and error objects.
+ */
+ (config: webpack.Configuration,
+ webpack: webpack.Webpack,
+ callback?: (err: Error, stats: webpack.compiler.Stats) => void): NodeJS.ReadWriteStream;
+ }
+
+ var webpackStream: WebpackStreamStatic;
+
+ export = webpackStream;
+}
From 24b237de6c18bc17f87443c16c5922c29b26a098 Mon Sep 17 00:00:00 2001
From: Sam Verschueren
Date: Sun, 24 Jul 2016 07:52:55 +0200
Subject: [PATCH 17/81] add load-json-file (#10246)
---
load-json-file/load-json-file-tests.ts | 15 +++++++++++++++
load-json-file/load-json-file.d.ts | 26 ++++++++++++++++++++++++++
2 files changed, 41 insertions(+)
create mode 100644 load-json-file/load-json-file-tests.ts
create mode 100644 load-json-file/load-json-file.d.ts
diff --git a/load-json-file/load-json-file-tests.ts b/load-json-file/load-json-file-tests.ts
new file mode 100644
index 0000000000..89884bf78a
--- /dev/null
+++ b/load-json-file/load-json-file-tests.ts
@@ -0,0 +1,15 @@
+///
+import * as loadJsonFile from 'load-json-file';
+
+function assert(actual: string, expected: string): void {
+ if (actual !== expected) {
+ throw new Error(`${JSON.stringify(actual)} !== ${JSON.stringify(expected)}`);
+ }
+}
+
+loadJsonFile('../package.json').then(pkg => {
+ assert(pkg.name, 'definitely-typed');
+});
+
+const pkg = loadJsonFile.sync('../package.json');
+assert(pkg.name, 'definitely-typed');
diff --git a/load-json-file/load-json-file.d.ts b/load-json-file/load-json-file.d.ts
new file mode 100644
index 0000000000..3da3c5ac2f
--- /dev/null
+++ b/load-json-file/load-json-file.d.ts
@@ -0,0 +1,26 @@
+// Type definitions for load-json-file v2.0.0
+// Project: https://github.com/sindresorhus/load-json-file
+// Definitions by: Sam Verschueren
+// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
+
+declare module "load-json-file" {
+
+ interface LoadJsonFile {
+ /**
+ * Returns a promise for the parsed JSON.
+ *
+ * @param filepath
+ */
+ (filepath: string): Promise;
+ /**
+ * Returns the parsed JSON.
+ *
+ * @param filepath
+ */
+ sync(filepath: string): any;
+ }
+
+ const loadJsonFile: LoadJsonFile;
+
+ export = loadJsonFile;
+}
From b27c623e2ad8e6b88d39ce0cd3a83b7c1a1ec875 Mon Sep 17 00:00:00 2001
From: Eytan Manor
Date: Sun, 24 Jul 2016 08:57:39 +0300
Subject: [PATCH 18/81] refactor(meteor-publish-composite): Add module
definition to 'meteor-publish-composite' definition file (#10245)
---
.../meteor-publish-composite.d.ts | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/meteor-publish-composite/meteor-publish-composite.d.ts b/meteor-publish-composite/meteor-publish-composite.d.ts
index ac1e189e57..c5b8f87e4f 100644
--- a/meteor-publish-composite/meteor-publish-composite.d.ts
+++ b/meteor-publish-composite/meteor-publish-composite.d.ts
@@ -63,3 +63,18 @@ declare namespace Meteor {
PublishCompositeConfig|PublishCompositeConfig[]
) : void;
}
+
+declare module 'meteor/meteor' {
+ namespace Meteor {
+ function publishComposite(
+ name : string,
+ config : PublishCompositeConfig|PublishCompositeConfig[]
+ ) : void;
+
+ function publishComposite(
+ name : string,
+ configFunc : (...args : any[]) =>
+ PublishCompositeConfig|PublishCompositeConfig[]
+ ) : void;
+ }
+}
From 10f5180288583a331301e9f3531533a86c7f0d74 Mon Sep 17 00:00:00 2001
From: Eytan Manor
Date: Sun, 24 Jul 2016 08:58:43 +0300
Subject: [PATCH 19/81] feat(meteor-accounts-phone): Add
'meteor-accounts-phone' definition file (#10244)
---
.../meteor-accounts-phone-tests.ts | 50 ++++++++++++++
.../meteor-accounts-phone.d.ts | 69 +++++++++++++++++++
2 files changed, 119 insertions(+)
create mode 100644 meteor-accounts-phone/meteor-accounts-phone-tests.ts
create mode 100644 meteor-accounts-phone/meteor-accounts-phone.d.ts
diff --git a/meteor-accounts-phone/meteor-accounts-phone-tests.ts b/meteor-accounts-phone/meteor-accounts-phone-tests.ts
new file mode 100644
index 0000000000..0604d54939
--- /dev/null
+++ b/meteor-accounts-phone/meteor-accounts-phone-tests.ts
@@ -0,0 +1,50 @@
+///
+
+let booleanResult: boolean;
+const options = {};
+function noop() {}
+
+SMS.twilio = {
+ FROM: 'me',
+ ACCOUNT_SID: 'my-account-sid',
+ AUTH_TOKEN: 'my-auth-token'
+};
+
+SMS.phoneTemplate = {
+ from: 'me',
+ text: noop
+};
+
+SMS.send(options);
+SMS.send(options, noop);
+
+Meteor.loginWithPhoneAndPassword(options, 'password');
+Meteor.loginWithPhoneAndPassword('options', 'password');
+Meteor.loginWithPhoneAndPassword(options, 'password', noop);
+Meteor.loginWithPhoneAndPassword('options', 'password', noop);
+
+Accounts._options = {
+ verificationCodeLength: 4,
+ verificationMaxRetries: 10,
+ verificationRetriesWaitTime: 60 * 1000,
+ verificationWaitTime: 10 * 1000,
+ sendPhoneVerificationCodeOnCreation: true,
+ forbidClientAccountCreation: true,
+ phoneVerificationMasterCode: ['1234'],
+ adminPhoneNumbers: ['+972546999999']
+};
+
+Accounts.createUserWithPhone(options);
+Accounts.createUserWithPhone(options, noop);
+
+Accounts.requestPhoneVerification('+972546999999');
+Accounts.requestPhoneVerification('+972546999999', noop);
+
+Accounts.verifyPhone('+972546999999', '1234');
+Accounts.verifyPhone('+972546999999', '1234', noop);
+Accounts.verifyPhone('+972546999999', '1234', '123456');
+Accounts.verifyPhone('+972546999999', '1234', '123456', noop);
+
+booleanResult = Accounts.isPhoneVerified();
+
+Accounts.onPhoneVerification(noop);
diff --git a/meteor-accounts-phone/meteor-accounts-phone.d.ts b/meteor-accounts-phone/meteor-accounts-phone.d.ts
new file mode 100644
index 0000000000..fe8a610d7f
--- /dev/null
+++ b/meteor-accounts-phone/meteor-accounts-phone.d.ts
@@ -0,0 +1,69 @@
+// Type definitions for accounts-phone 0.0.21
+// Project: https://github.com/okland/accounts-phone
+// Definitions by: Eytan Manor
+// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
+
+declare namespace SMS {
+ var twilio: {
+ FROM?: string;
+ ACCOUNT_SID?: string;
+ AUTH_TOKEN?: string;
+ };
+
+ var phoneTemplate: {
+ from: string;
+ text: Function;
+ };
+
+ function send(options: Object, callback?: Function): void;
+}
+
+declare namespace Meteor {
+ function loginWithPhoneAndPassword(selector: Object | String, password: String, callback?: Function): void;
+}
+
+declare module 'meteor/meteor' {
+ namespace Meteor {
+ function loginWithPhoneAndPassword(selector: Object | String, password: String, callback?: Function): void;
+ }
+}
+
+declare namespace Accounts {
+ var _options: {
+ verificationCodeLength?: number,
+ verificationMaxRetries?: number,
+ verificationRetriesWaitTime?: number,
+ verificationWaitTime?: number,
+ sendPhoneVerificationCodeOnCreation?: boolean,
+ forbidClientAccountCreation?: boolean,
+ phoneVerificationMasterCode?: Array,
+ adminPhoneNumbers?: Array
+ };
+
+ function createUserWithPhone(options: Object, callback?: Function): void;
+ function requestPhoneVerification(phone: string, callback?: Function): void;
+ function verifyPhone(phone: string, code: string, newPassword?: string | Function, callback?: Function): void;
+ function isPhoneVerified(): boolean;
+ function onPhoneVerification(func: Function): void;
+}
+
+declare module 'meteor/accounts-base' {
+ namespace Accounts {
+ var _options: {
+ verificationCodeLength?: number,
+ verificationMaxRetries?: number,
+ verificationRetriesWaitTime?: number,
+ verificationWaitTime?: number,
+ sendPhoneVerificationCodeOnCreation?: boolean,
+ forbidClientAccountCreation?: boolean,
+ phoneVerificationMasterCode?: Array,
+ adminPhoneNumbers?: Array
+ };
+
+ function createUserWithPhone(options: Object, callback?: Function): void;
+ function requestPhoneVerification(phone: string, callback?: Function): void;
+ function verifyPhone(phone: string, code: string, newPassword?: string | Function, callback?: Function): void;
+ function isPhoneVerified(): boolean;
+ function onPhoneVerification(func: Function): void;
+ }
+}
\ No newline at end of file
From 994439d8ed69b57f5779cec2b07bf91f9dfddf49 Mon Sep 17 00:00:00 2001
From: Esteban Ordano
Date: Sun, 24 Jul 2016 02:59:38 -0300
Subject: [PATCH 20/81] ioredis: Add some missing properties (#10240)
These are minor changes:
* There's a `status` field that can be used to check if the connection to the redis server is active.
* There's a `getBuffer` method that returns a node `Buffer` instance instead of a string (if you're saving binary data on redis, this is useful).
* The callback on `connect` is optional.
---
ioredis/ioredis.d.ts | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/ioredis/ioredis.d.ts b/ioredis/ioredis.d.ts
index a3769fee6c..983ed39f10 100644
--- a/ioredis/ioredis.d.ts
+++ b/ioredis/ioredis.d.ts
@@ -41,7 +41,8 @@ declare module IORedis {
}
interface Redis extends NodeJS.EventEmitter, Commander {
- connect(callback: Function): Promise;
+ status: string;
+ connect(callback?: Function): Promise;
disconnect(): void;
duplicate(): Redis;
monitor(calback: (error: Error, monitor: NodeJS.EventEmitter) => void): Promise;
@@ -59,6 +60,7 @@ declare module IORedis {
subscribe(channel: string): any;
get(args: any[], callback?: ResCallbackT): any;
get(...args: any[]): any;
+ getBuffer(key: string, callback?: ResCallbackT): any;
set(args: any[], callback?: ResCallbackT): any;
set(...args: any[]): any;
setnx(args: any[], callback?: ResCallbackT): any;
From b3889a9127faef8ca41ae67f3bf7aa3e26f1a77d Mon Sep 17 00:00:00 2001
From: "Dmitry A. Efimenko"
Date: Sat, 23 Jul 2016 23:00:16 -0700
Subject: [PATCH 21/81] Agenda missing props/methods (#10239)
---
agenda/agenda.d.ts | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/agenda/agenda.d.ts b/agenda/agenda.d.ts
index 463ba43d2e..8dd58fdd80 100644
--- a/agenda/agenda.d.ts
+++ b/agenda/agenda.d.ts
@@ -319,6 +319,11 @@ declare module "agenda" {
* The date/time the job last failed.
*/
failedAt: Date;
+
+ /**
+ * Job's state
+ */
+ disabled: boolean
}
/**
@@ -409,6 +414,11 @@ declare module "agenda" {
* @param cb Called after the job has been saved to the database.
*/
touch(cb?: Callback): void;
+
+ /**
+ * Calculates next time the job should run
+ */
+ computeNextRunAt(): Job;
}
interface JobOptions {
From 5ad563cfc0e00afa2afabd44e7eb3647547eee59 Mon Sep 17 00:00:00 2001
From: Alexey Svetliakov
Date: Sun, 24 Jul 2016 08:01:10 +0200
Subject: [PATCH 22/81] Aphrodite (#10238)
* Aphrodite
* added no-important module
* change css() args to any[]
---
aphrodite/aphrodite-tests.tsx | 82 +++++++++++++++++++++++++++++++++++
aphrodite/aphrodite.d.ts | 76 ++++++++++++++++++++++++++++++++
2 files changed, 158 insertions(+)
create mode 100644 aphrodite/aphrodite-tests.tsx
create mode 100644 aphrodite/aphrodite.d.ts
diff --git a/aphrodite/aphrodite-tests.tsx b/aphrodite/aphrodite-tests.tsx
new file mode 100644
index 0000000000..76d28ca43f
--- /dev/null
+++ b/aphrodite/aphrodite-tests.tsx
@@ -0,0 +1,82 @@
+///
+///
+
+import * as React from "react";
+import { StyleSheet, css, StyleSheetServer, StyleSheetTestUtils } from "aphrodite";
+
+const styles = StyleSheet.create({
+ red: {
+ backgroundColor: 'red'
+ },
+ blue: {
+ backgroundColor: 'blue'
+ },
+ hover: {
+ ':hover': {
+ backgroundColor: 'red'
+ }
+ },
+ small: {
+ '@media (max-width: 600px)': {
+ backgroundColor: 'red',
+ }
+ }
+});
+
+const coolFont = {
+ fontFamily: "CoolFont",
+ fontStyle: "normal",
+ fontWeight: "normal",
+ src: "url('coolfont.woff2') format('woff2')"
+};
+
+const withFont = StyleSheet.create({
+ headingText: {
+ fontFamily: coolFont,
+ fontSize: 20
+ },
+ bodyText: {
+ fontFamily: [coolFont, "sans-serif"],
+ fontSize: 12
+ }
+});
+
+
+class App extends React.Component<{}, {}> {
+ render() {
+ return
+
+ This is red.
+
+
+ This turns red on hover.
+
+
+ This turns red when the browser is less than 600px width.
+
+
+ This is blue.
+
+
+ This is blue and turns red when the browser is less than
+ 600px width.
+
+
+ With font
+
+
;
+ }
+}
+
+const output = StyleSheetServer.renderStatic(() => {
+ return "test";
+});
+
+output.css.content;
+output.css.renderedClassNames;
+output.html;
+
+StyleSheet.rehydrate(output.css.renderedClassNames);
+
+StyleSheetTestUtils.suppressStyleInjection();
+StyleSheetTestUtils.clearBufferAndResumeStyleInjection();
diff --git a/aphrodite/aphrodite.d.ts b/aphrodite/aphrodite.d.ts
new file mode 100644
index 0000000000..89d8646e54
--- /dev/null
+++ b/aphrodite/aphrodite.d.ts
@@ -0,0 +1,76 @@
+// Type definitions for Aphrodite 0.5.0
+// Project: https://github.com/Khan/aphrodite
+// Definitions by: Alexey Svetliakov
+// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
+
+///
+
+declare module "aphrodite" {
+ import * as React from "react";
+
+ /**
+ * Aphrodite style declaration
+ */
+ export interface StyleDeclaration {
+ [key: string]: React.CSSProperties;
+ }
+
+ interface StyleSheetStatic {
+ /**
+ * Create style sheet
+ */
+ create(styles: T): T;
+ /**
+ * Rehydrate class names from server renderer
+ */
+ rehydrate(renderedClassNames: string[]): void;
+ }
+
+ export var StyleSheet: StyleSheetStatic;
+ /**
+ * Get class names from passed styles
+ */
+ export function css(...styles: any[]): string;
+
+ interface StaticRendererResult {
+ html: string;
+ css: {
+ content: string;
+ renderedClassNames: string[];
+ }
+ }
+
+ /**
+ * Utilities for using Aphrodite server-side.
+ */
+ interface StyleSheetServerStatic {
+ renderStatic(renderFunc: () => string): StaticRendererResult;
+ }
+
+ export var StyleSheetServer: StyleSheetServerStatic;
+
+ interface StyleSheetTestUtilsStatic {
+ /**
+ * Prevent styles from being injected into the DOM.
+ *
+ * This is useful in situations where you'd like to test rendering UI
+ * components which use Aphrodite without any of the side-effects of
+ * Aphrodite happening. Particularly useful for testing the output of
+ * components when you have no DOM, e.g. testing in Node without a fake DOM.
+ *
+ * Should be paired with a subsequent call to
+ * clearBufferAndResumeStyleInjection.
+ */
+ suppressStyleInjection(): void;
+ /**
+ * Opposite method of preventStyleInject.
+ */
+ clearBufferAndResumeStyleInjection(): void;
+ }
+
+ export var StyleSheetTestUtils: StyleSheetTestUtilsStatic;
+}
+
+declare module "aphrodite/no-important" {
+ export * from "aphrodite";
+}
From 66876a46ecef0bc3263e3f16e097bd1b2b3059a0 Mon Sep 17 00:00:00 2001
From: Volker Braun
Date: Sun, 24 Jul 2016 08:01:27 +0200
Subject: [PATCH 23/81] Indexing the IDocumentService should return Document
(#10237)
JQ(lite)-unwrapping $document[0] should be of type Document instead of
the default HTMLElement. Otherwise important methods like
getElementById are missing.
---
angularjs/angular.d.ts | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/angularjs/angular.d.ts b/angularjs/angular.d.ts
index 2d9469ef80..82cce46541 100644
--- a/angularjs/angular.d.ts
+++ b/angularjs/angular.d.ts
@@ -985,7 +985,9 @@ declare namespace angular {
// DocumentService
// see http://docs.angularjs.org/api/ng.$document
///////////////////////////////////////////////////////////////////////////
- interface IDocumentService extends JQuery {}
+ interface IDocumentService extends JQuery {
+ [index: number]: Document;
+ }
///////////////////////////////////////////////////////////////////////////
// ExceptionHandlerService
From 0afdcee8787c6491f4046a289306662ccdf11075 Mon Sep 17 00:00:00 2001
From: ^_^
Date: Sun, 24 Jul 2016 09:01:57 +0300
Subject: [PATCH 24/81] Update jquery.fileupload definitions (#10236)
Actual code always tries to convert anything that's not jquery object to jquery
---
jquery.fileupload/jquery.fileupload.d.ts | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/jquery.fileupload/jquery.fileupload.d.ts b/jquery.fileupload/jquery.fileupload.d.ts
index da94ce19c6..7e46241999 100644
--- a/jquery.fileupload/jquery.fileupload.d.ts
+++ b/jquery.fileupload/jquery.fileupload.d.ts
@@ -17,13 +17,13 @@ interface JQueryFileInputOptions {
* The drop target element(s), by the default the complete document.
* Set to null to disable drag & drop support:
*/
- dropZone?: HTMLElement;
+ dropZone?: Element | Element[] | JQuery | string;
/**
* The paste target element(s), by the default the complete document.
* Set to null to disable paste support:
*/
- pasteZone?: HTMLElement;
+ pasteZone?: Element | Element[] | JQuery | string;
/**
* The file input field(s), that are listened to for change events.
@@ -31,7 +31,7 @@ interface JQueryFileInputOptions {
* of the widget element on plugin initialization.
* Set to null to disable the change listener.
*/
- fileInput?: HTMLElement;
+ fileInput?: Element | Element[] | JQuery | string;
/**
* By default, the file input field is replaced with a clone after
@@ -286,4 +286,4 @@ interface JQueryFileUploadProgressObject extends JQueryFileInputOptions, JQueryF
}
interface JQueryFileUploadDone extends JQueryFileInputOptions, JQueryFileUploadXhr {
-}
\ No newline at end of file
+}
From d8d32d70b44d80c7b49bf515737e71f0b4b62b35 Mon Sep 17 00:00:00 2001
From: Matt Jeanes
Date: Sun, 24 Jul 2016 07:20:53 +0100
Subject: [PATCH 25/81] Add WorkItemTrackingApi.createWorkItem to vso-node-api
(#10233)
---
vso-node-api/vso-node-api.d.ts | 29 ++++++++++++++++++++++++-----
1 file changed, 24 insertions(+), 5 deletions(-)
diff --git a/vso-node-api/vso-node-api.d.ts b/vso-node-api/vso-node-api.d.ts
index 55fd857703..846cbf270a 100644
--- a/vso-node-api/vso-node-api.d.ts
+++ b/vso-node-api/vso-node-api.d.ts
@@ -12714,7 +12714,8 @@ declare module 'vso-node-api/WorkItemTrackingApi' {
getWorkItem(id: number, fields: string[], asOf: Date, expand: WorkItemTrackingInterfaces.WorkItemExpand, onResult: (err: any, statusCode: number, workItem: WorkItemTrackingInterfaces.WorkItem) => void): void;
getWorkItems(ids: number[], fields: string[], asOf: Date, expand: WorkItemTrackingInterfaces.WorkItemExpand, onResult: (err: any, statusCode: number, workItems: WorkItemTrackingInterfaces.WorkItem[]) => void): void;
updateWorkItem(customHeaders: any, document: VSSInterfaces.JsonPatchDocument, id: number, validateOnly: boolean, bypassRules: boolean, onResult: (err: any, statusCode: number, workItem: WorkItemTrackingInterfaces.WorkItem) => void): void;
- getWorkItemTemplate(project: string, type: string, fields: string, asOf: Date, expand: WorkItemTrackingInterfaces.WorkItemExpand, onResult: (err: any, statusCode: number, workItem: WorkItemTrackingInterfaces.WorkItem) => void): void;
+ createWorkItem(customHeaders: any, document: VSSInterfaces.JsonPatchDocument, project: string, type: string, validateOnly: boolean, bypassRules: boolean, onResult: (err: any, statusCode: number, workItem: WorkItemTrackingInterfaces.WorkItem) => void): void;
+ getWorkItemTemplate(project: string, type: string, fields: string, asOf: Date, expand: WorkItemTrackingInterfaces.WorkItemExpand, onResult: (err: any, statusCode: number, workItem: WorkItemTrackingInterfaces.WorkItem) => void): void;
updateWorkItemTemplate(customHeaders: any, document: VSSInterfaces.JsonPatchDocument, project: string, type: string, validateOnly: boolean, bypassRules: boolean, onResult: (err: any, statusCode: number, workItem: WorkItemTrackingInterfaces.WorkItem) => void): void;
getWorkItemTypeCategories(project: string, onResult: (err: any, statusCode: number, workItemTypeCategories: WorkItemTrackingInterfaces.WorkItemTypeCategory[]) => void): void;
getWorkItemTypeCategory(project: string, category: string, onResult: (err: any, statusCode: number, workItemTypeCategorie: WorkItemTrackingInterfaces.WorkItemTypeCategory) => void): void;
@@ -12752,7 +12753,8 @@ declare module 'vso-node-api/WorkItemTrackingApi' {
getWorkItem(id: number, fields?: string[], asOf?: Date, expand?: WorkItemTrackingInterfaces.WorkItemExpand): Q.Promise;
getWorkItems(ids: number[], fields?: string[], asOf?: Date, expand?: WorkItemTrackingInterfaces.WorkItemExpand): Q.Promise;
updateWorkItem(customHeaders: any, document: VSSInterfaces.JsonPatchDocument, id: number, validateOnly?: boolean, bypassRules?: boolean): Q.Promise;
- getWorkItemTemplate(project: string, type: string, fields?: string, asOf?: Date, expand?: WorkItemTrackingInterfaces.WorkItemExpand): Q.Promise;
+ createWorkItem(customHeaders: any, document: VSSInterfaces.JsonPatchDocument, project: string, type: string, validateOnly?: boolean, bypassRules?: boolean): Q.Promise;
+ getWorkItemTemplate(project: string, type: string, fields?: string, asOf?: Date, expand?: WorkItemTrackingInterfaces.WorkItemExpand): Q.Promise;
updateWorkItemTemplate(customHeaders: any, document: VSSInterfaces.JsonPatchDocument, project: string, type: string, validateOnly?: boolean, bypassRules?: boolean): Q.Promise;
getWorkItemTypeCategories(project: string): Q.Promise;
getWorkItemTypeCategory(project: string, category: string): Q.Promise;
@@ -13027,7 +13029,16 @@ declare module 'vso-node-api/WorkItemTrackingApi' {
* @param {WorkItemTrackingInterfaces.WorkItemExpand} expand
* @param onResult callback function with the resulting WorkItemTrackingInterfaces.WorkItem
*/
- getWorkItemTemplate(project: string, type: string, fields: string, asOf: Date, expand: WorkItemTrackingInterfaces.WorkItemExpand, onResult: (err: any, statusCode: number, workItem: WorkItemTrackingInterfaces.WorkItem) => void): void;
+ getWorkItemTemplate(project: string, type: string, fields: string, asOf: Date, expand: WorkItemTrackingInterfaces.WorkItemExpand, onResult: (err: any, statusCode: number, workItem: WorkItemTrackingInterfaces.WorkItem) => void): void;
+ /**
+ * @param {VSSInterfaces.JsonPatchDocument} document
+ * @param {string} project - Project ID or project name
+ * @param {string} type
+ * @param {boolean} validateOnly
+ * @param {boolean} bypassRules
+ * @param onResult callback function with the resulting WorkItemTrackingInterfaces.WorkItem
+ */
+ createWorkItem(customHeaders: any, document: VSSInterfaces.JsonPatchDocument, project: string, type: string, validateOnly: boolean, bypassRules: boolean, onResult: (err: any, statusCode: number, workItem: WorkItemTrackingInterfaces.WorkItem) => void): void;
/**
* @param {VSSInterfaces.JsonPatchDocument} document
* @param {string} project - Project ID or project name
@@ -13282,7 +13293,15 @@ declare module 'vso-node-api/WorkItemTrackingApi' {
* @param {boolean} bypassRules
*/
updateWorkItem(customHeaders: any, document: VSSInterfaces.JsonPatchDocument, id: number, validateOnly?: boolean, bypassRules?: boolean): Q.Promise;
- /**
+ /**
+ * @param {VSSInterfaces.JsonPatchDocument} document
+ * @param {string} project - Project ID or project name
+ * @param {string} type
+ * @param {boolean} validateOnly
+ * @param {boolean} bypassRules
+ */
+ createWorkItem(customHeaders: any, document: VSSInterfaces.JsonPatchDocument, project: string, type: string, validateOnly?: boolean, bypassRules?: boolean): Q.Promise;
+ /**
* Returns a single work item from a template
*
* @param {string} project - Project ID or project name
@@ -13433,4 +13452,4 @@ declare module 'vso-node-api/WebApi' {
getQWorkItemTrackingApi(serverUrl?: string, handlers?: VsoBaseInterfaces.IRequestHandler[]): workitemtrackingm.IQWorkItemTrackingApi;
}
-}
+}
\ No newline at end of file
From 3dde9d27dbc3269c09dad6eb95ab0f33bce312ad Mon Sep 17 00:00:00 2001
From: MichaelBuen
Date: Sun, 24 Jul 2016 14:21:08 +0800
Subject: [PATCH 26/81] Update aws-sdk.d.ts (#10232)
Make QueueUrl optional, as it can have a default value that is be obtained from aws.SQS:
```
var sqs = new aws.SQS({
region: config.aws.region,
accessKeyId: config.aws.accessID,
secretAccessKey: config.aws.secretKey,
// For every request in this demo, I'm going to be using the same QueueUrl; so,
// rather than explicitly defining it on every request, I can set it here as the
// default QueueUrl to be automatically appended to every request.
params: {
QueueUrl: config.aws.queueUrl
}
});
var sendMessage = Q.nbind( sqs.sendMessage, sqs );
// ---------------------------------------------------------- //
// ---------------------------------------------------------- //
// Now that we have a Q-ified method, we can send the message.
sendMessage({
MessageBody: "This is my first ever SQS request... evar!"
})
```
Based on:
http://www.bennadel.com/blog/2792-shedding-the-monolithic-application-with-aws-simple-queue-service-sqs-and-node-js.htm
---
aws-sdk/aws-sdk.d.ts | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/aws-sdk/aws-sdk.d.ts b/aws-sdk/aws-sdk.d.ts
index 270f06d36a..a5341fcb45 100644
--- a/aws-sdk/aws-sdk.d.ts
+++ b/aws-sdk/aws-sdk.d.ts
@@ -397,7 +397,7 @@ declare module "aws-sdk" {
}
export interface SendMessageParams {
- QueueUrl: string;
+ QueueUrl?: string;
MessageBody: string;
DelaySeconds?: number;
MessageAttributes?: { [name:string]: MessageAttribute; }
From 13837166f17c4ac709e2fe8c685df132c0d723ef Mon Sep 17 00:00:00 2001
From: Ruben Slabbert
Date: Sun, 24 Jul 2016 16:25:36 +1000
Subject: [PATCH 27/81] Knex.js: Added TableName type and changed join bindings
(#10227)
---
knex/knex-tests.ts | 4 ++++
knex/knex.d.ts | 13 +++++++------
2 files changed, 11 insertions(+), 6 deletions(-)
diff --git a/knex/knex-tests.ts b/knex/knex-tests.ts
index c01c54691e..a7a0417cc4 100644
--- a/knex/knex-tests.ts
+++ b/knex/knex-tests.ts
@@ -156,6 +156,10 @@ knex('users')
.join('contacts', 'users.id', 'contacts.user_id')
.select('users.id', 'contacts.phone');
+knex('users')
+ .join(knex('contacts').select('user_id', 'phone').as('contacts'), 'users.id', 'contacts.user_id')
+ .select('users.id', 'contacts.phone');
+
knex.select('*').from('users').join('accounts', function() {
this.on('accounts.id', '=', 'users.account_id').orOn('accounts.owner_id', '=', 'users.id')
});
diff --git a/knex/knex.d.ts b/knex/knex.d.ts
index 24020b0083..bb6395807e 100644
--- a/knex/knex.d.ts
+++ b/knex/knex.d.ts
@@ -14,6 +14,7 @@ declare module "knex" {
type Client = Function;
type Value = string|number|boolean|Date|Array|Array|Array|Array;
type ColumnName = string|Knex.Raw|Knex.QueryBuilder;
+ type TableName = string|Knex.Raw|Knex.QueryBuilder;
interface Knex extends Knex.QueryInterface {
(tableName?: string): Knex.QueryBuilder;
@@ -164,12 +165,12 @@ declare module "knex" {
interface Join {
(raw: Raw): QueryBuilder;
- (tableName: string, callback: (joinClause: JoinClause) => any): QueryBuilder;
- (tableName: string, columns: {[key: string]: string|Raw}): QueryBuilder;
- (tableName: string, raw: Raw): QueryBuilder;
- (tableName: string, column1: string, column2: string): QueryBuilder;
- (tableName: string, column1: string, raw: Raw): QueryBuilder;
- (tableName: string, column1: string, operator: string, column2: string): QueryBuilder;
+ (tableName: TableName, callback: (joinClause: JoinClause) => any): QueryBuilder;
+ (tableName: TableName, columns: {[key: string]: string|Raw}): QueryBuilder;
+ (tableName: TableName, raw: Raw): QueryBuilder;
+ (tableName: TableName, column1: string, column2: string): QueryBuilder;
+ (tableName: TableName, column1: string, raw: Raw): QueryBuilder;
+ (tableName: TableName, column1: string, operator: string, column2: string): QueryBuilder;
}
interface JoinClause {
From 98c279c49f82f5a49e22c69bf93f0417816ee6e7 Mon Sep 17 00:00:00 2001
From: Matt Ferderer
Date: Sun, 24 Jul 2016 01:26:38 -0500
Subject: [PATCH 28/81] Added events to cropperjs options and tests for the
events. The tests are from usage example on the cropperjs GitHub repo.
(#10226)
---
cropperjs/cropperjs-tests.ts | 14 ++++++++++++++
cropperjs/cropperjs.d.ts | 19 +++++++++++++++++++
2 files changed, 33 insertions(+)
diff --git a/cropperjs/cropperjs-tests.ts b/cropperjs/cropperjs-tests.ts
index d328a12b4a..82232c268a 100644
--- a/cropperjs/cropperjs-tests.ts
+++ b/cropperjs/cropperjs-tests.ts
@@ -1,2 +1,16 @@
///
import * as Cropper from 'cropperjs';
+
+var image = document.getElementById('image');
+var cropper = new Cropper(image, {
+ aspectRatio: 16 / 9,
+ crop: function(e) {
+ console.log(e.detail.x);
+ console.log(e.detail.y);
+ console.log(e.detail.width);
+ console.log(e.detail.height);
+ console.log(e.detail.rotate);
+ console.log(e.detail.scaleX);
+ console.log(e.detail.scaleY);
+ }
+});
diff --git a/cropperjs/cropperjs.d.ts b/cropperjs/cropperjs.d.ts
index f2f8e861e5..c76b4c7766 100644
--- a/cropperjs/cropperjs.d.ts
+++ b/cropperjs/cropperjs.d.ts
@@ -11,7 +11,26 @@ declare module cropperjs {
CanvasShouldNotBeWithInTheContainer = 2,
ContainerSshouldBeWithInTheCanvas = 3
}
+ export interface CropperCustomEvent extends CustomEvent {
+ detail: Data;
+ }
export interface CropperOptions {
+ /**
+ * Function called when crop box is moved or resized
+ */
+ crop?: (event: CropperCustomEvent) => void;
+ /**
+ * Function called at start of crop box being moved or resized
+ */
+ cropstart?: (event: CropperCustomEvent) => void;
+ /**
+ * Function called when crop box is moved
+ */
+ cropmove?: (event: CropperCustomEvent) => void;
+ /**
+ * Function called when crop box is finished being moved or resized
+ */
+ cropend?: (event: CropperCustomEvent) => void;
/**
* Define the view mode of the cropper.
* @default 0
From 269fe3fee957004647d5890afcffd9652c1ab3de Mon Sep 17 00:00:00 2001
From: mcriss
Date: Sun, 24 Jul 2016 01:26:53 -0500
Subject: [PATCH 29/81] Add nodir to SrcOptions (#10225)
---
gulp/gulp.d.ts | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/gulp/gulp.d.ts b/gulp/gulp.d.ts
index 43bb5aa597..74968ddcc5 100644
--- a/gulp/gulp.d.ts
+++ b/gulp/gulp.d.ts
@@ -149,6 +149,11 @@ declare module "gulp" {
* Note that an explicit dot in a portion of the pattern will always match dot files.
*/
dot?: boolean;
+
+ /**
+ * Set to match only fles, not directories. Set this flag to prevent copying empty directories
+ */
+ nodir?: boolean;
/**
* By default, a pattern starting with a forward-slash will be "mounted" onto the root setting, so that a valid
From b9a4af1c2f47588836f62c4039d45926e50dbafd Mon Sep 17 00:00:00 2001
From: Sachin Patney
Date: Sat, 23 Jul 2016 23:27:14 -0700
Subject: [PATCH 30/81] Update plotly.js.d.ts (#10222)
This could also just be an element instead of a selector string
---
plotly.js/plotly.js.d.ts | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/plotly.js/plotly.js.d.ts b/plotly.js/plotly.js.d.ts
index 3083ea1ca3..863c708abb 100644
--- a/plotly.js/plotly.js.d.ts
+++ b/plotly.js/plotly.js.d.ts
@@ -29,7 +29,7 @@ interface PlotlyConfig {
}
interface PlotlyStatic {
- newPlot(divid:string, data:any[], layout?:any, config?:PlotlyConfig):void;
+ newPlot(divid:string | HTMLElement, data:any[], layout?:any, config?:PlotlyConfig):void;
}
declare module "plotly.js" {
From 00055c095dae3330f12553aba19da42bc063baf6 Mon Sep 17 00:00:00 2001
From: alexndlm
Date: Sun, 24 Jul 2016 09:28:56 +0300
Subject: [PATCH 31/81] Add type definitions for BazingaJsTranslationBundle
(#10220)
---
.../bazinga-translator-tests.ts | 12 +++
bazinga-translator/bazinga-translator.d.ts | 99 +++++++++++++++++++
2 files changed, 111 insertions(+)
create mode 100644 bazinga-translator/bazinga-translator-tests.ts
create mode 100644 bazinga-translator/bazinga-translator.d.ts
diff --git a/bazinga-translator/bazinga-translator-tests.ts b/bazinga-translator/bazinga-translator-tests.ts
new file mode 100644
index 0000000000..2401641815
--- /dev/null
+++ b/bazinga-translator/bazinga-translator-tests.ts
@@ -0,0 +1,12 @@
+///
+
+Translator.fallback = 'en';
+Translator.defaultDomain = 'messages';
+
+Translator.add("test", "it work", "frontend", "en");
+
+Translator.trans('key', {}, 'frontend');
+Translator.trans('key', {"foo": "bar"}, 'DOMAIN_NAME');
+
+Translator.transChoice('key', 1, {}, 'frontend');
+Translator.transChoice('key', 123, {"foo": "bar"}, 'DOMAIN_NAME');
\ No newline at end of file
diff --git a/bazinga-translator/bazinga-translator.d.ts b/bazinga-translator/bazinga-translator.d.ts
new file mode 100644
index 0000000000..5467fbfd85
--- /dev/null
+++ b/bazinga-translator/bazinga-translator.d.ts
@@ -0,0 +1,99 @@
+// Type definitions for Translator
+// Project: https://github.com/willdurand/BazingaJsTranslationBundle
+// Definitions by: Alex
+// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
+
+interface BazingaTranslator {
+ /**
+ * The current locale.
+ *
+ * @type {String}
+ */
+ locale: string;
+
+ /**
+ * Fallback locale.
+ *
+ * @type {String}
+ */
+ fallback: string;
+
+ /**
+ * Placeholder prefix.
+ *
+ * @type {String}
+ */
+ placeHolderPrefix: string;
+
+ /**
+ * Placeholder suffix.
+ *
+ * @type {String}
+ */
+ placeHolderSuffix: string;
+
+ /**
+ * Default domain.
+ *
+ * @type {String}
+ */
+ defaultDomain: string;
+
+ /**
+ * Plural separator.
+ *
+ * @type {String}
+ */
+ pluralSeparator: string;
+
+ /**
+ * Adds a translation entry.
+ *
+ * @param {String} id The message id
+ * @param {String} message The message to register for the given id
+ * @param {String} [domain] The domain for the message or null to use the default
+ * @param {String} [locale] The locale or null to use the default
+ *
+ * @return {Object} Translator
+ */
+ add(id: string, message: string, domain: string, locale: string): BazingaTranslator;
+
+
+ /**
+ * Translates the given message.
+ *
+ * @param {String} id The message id
+ * @param {Object} [parameters] An array of parameters for the message
+ * @param {String} [domain] The domain for the message or null to guess it
+ * @param {String} [locale] The locale or null to use the default
+ *
+ * @return {String} The translated string
+ */
+ trans(id: string, parameters: any, domain: string, locale?: string): string;
+
+ /**
+ * Translates the given choice message by choosing a translation according to a number.
+ *
+ * @param {String} id The message id
+ * @param {Number} number The number to use to find the indice of the message
+ * @param {Object} [parameters] An array of parameters for the message
+ * @param {String} [domain] The domain for the message or null to guess it
+ * @param {String} [locale] The locale or null to use the default
+ *
+ * @return {String} The translated string
+ */
+ transChoice(id: string, number: number, parameters: any, domain: string, locale?: string): string,
+
+ /**
+ * Loads translations from JSON.
+ *
+ * @param {String} data A JSON string or object literal
+ *
+ * @return {Object} Translator
+ */
+ fromJSON(data: string): BazingaTranslator;
+
+ reset(): void;
+}
+
+declare var Translator: BazingaTranslator;
\ No newline at end of file
From da7c99c73bcdeb64c1238d537740825efdc24b89 Mon Sep 17 00:00:00 2001
From: Brad Smith
Date: Sat, 23 Jul 2016 23:30:08 -0700
Subject: [PATCH 32/81] Added unselectedTintColor prop to TabBarIOS (#10251)
Per https://facebook.github.io/react-native/docs/tabbarios.html#props
---
react-native/react-native.d.ts | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/react-native/react-native.d.ts b/react-native/react-native.d.ts
index 74a86e27b7..0ffc6763a7 100644
--- a/react-native/react-native.d.ts
+++ b/react-native/react-native.d.ts
@@ -3575,6 +3575,11 @@ declare namespace __React {
* A Boolean value that indicates whether the tab bar is translucent
*/
translucent?: boolean
+
+ /**
+ * Color of text on unselected tabs
+ */
+ unselectedTintColor?: string
}
export interface TabBarIOSStatic extends React.ComponentClass {
From 88992f2e3217cc9a3eefd78fc77e869d0e1ade14 Mon Sep 17 00:00:00 2001
From: Michael McKenzie
Date: Sun, 24 Jul 2016 07:31:10 +0100
Subject: [PATCH 33/81] Changing djit.Destroyable.own signature to match
documentation and implementation (#10219)
* Changing hitch signature to match documentation
* Changing hitch signature to match documentation
* Changing dojo/_base/lang mixin signature to match documentation
* Revert "Changing dojo/_base/lang mixin signature to match documentation"
This reverts commit cdfb764333a69c177fa59837d92a98b03f564538.
* Changing djit.Destroyable.own signature to match documentation and implmentation
---
dojo/dijit.d.ts | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dojo/dijit.d.ts b/dojo/dijit.d.ts
index 8d3e99b6b5..29abf02211 100644
--- a/dojo/dijit.d.ts
+++ b/dojo/dijit.d.ts
@@ -1606,7 +1606,7 @@ declare module dijit {
* already removed/destroyed manually.
*
*/
- own(): any;
+ own(...args: any[]): any[];
/**
* Place this widget somewhere in the DOM based
* on standard domConstruct.place() conventions.
From 0c98b1516770cb564d106abc8adf92c560e4eb13 Mon Sep 17 00:00:00 2001
From: Gabriel JUCHAULT
Date: Sun, 24 Jul 2016 08:31:51 +0200
Subject: [PATCH 34/81] Countdown.js (#10218)
* Countdown.js
* Remove header tags from tests
* fix(countdownjs): removed var
---
countdown/countdown-tests.ts | 42 ++++++++++++++++++++++
countdown/countdown.d.ts | 69 ++++++++++++++++++++++++++++++++++++
2 files changed, 111 insertions(+)
create mode 100644 countdown/countdown-tests.ts
create mode 100644 countdown/countdown.d.ts
diff --git a/countdown/countdown-tests.ts b/countdown/countdown-tests.ts
new file mode 100644
index 0000000000..c803f1acc2
--- /dev/null
+++ b/countdown/countdown-tests.ts
@@ -0,0 +1,42 @@
+///
+
+import { countdown, Timespan, CountdownStatic, Format } from 'countdown';
+
+let ts: Timespan;
+let interval: number;
+
+ts = countdown(new Date());
+ts = countdown(150);
+
+interval = countdown(new Date(),
+ function (ts: Timespan) {
+ document.getElementById('pageTimer').innerHTML = ts.toHTML('strong');
+ },
+ countdown.HOURS | countdown.MINUTES | countdown.SECONDS,
+ 2,
+ 2
+);
+
+clearInterval(interval);
+
+ts.toString('foo');
+ts.toHTML('em', 'foo');
+
+countdown.resetFormat();
+countdown.setLabels('a', 'b', 'c', 'd', 'e');
+
+countdown.setLabels('a', 'b', 'c', 'd', 'e', function (value: number): string {
+ return 'ok';
+}, function (value: number, unit: number): string {
+ return 'ok';
+});
+
+countdown.setLabels(null, null, null, null, 'Now.');
+
+countdown.setLabels(
+ ' millisecond| second| minute| hour| day| week| month| year| decade| century| millennium',
+ ' milliseconds| seconds| minutes| hours| days| weeks| months| years| decades| centuries| millennia',
+ ' and ',
+ ', ',
+ '',
+ n => n.toString());
diff --git a/countdown/countdown.d.ts b/countdown/countdown.d.ts
new file mode 100644
index 0000000000..5b40541dd0
--- /dev/null
+++ b/countdown/countdown.d.ts
@@ -0,0 +1,69 @@
+// Type definitions for countdown.js
+// Project: http://countdownjs.org/
+// Definitions by: Gabriel Juchault
+// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
+
+declare module 'countdown' {
+ export type DateFunction = (timespan: Timespan) => void;
+ export type DateTime = number | Date | DateFunction;
+
+ export interface Timespan {
+ start?: Date;
+ end?: Date;
+ units?: number;
+ value?: number;
+ millennia?: number;
+ centuries?: number;
+ decades?: number;
+ years?: number;
+ months?: number;
+ days?: number;
+ hours?: number;
+ minutes?: number;
+ seconds?: number;
+ milliseconds?: number;
+ toString(label?: string): string;
+ toHTML(tagName?: string, label?: string): string;
+ }
+
+ export interface Format {
+ singular?: string | Array;
+ plural?: string | Array;
+ last?: string;
+ delim?: string;
+ empty?: string;
+ formatNumber?(value: number): string;
+ formatter?(value: number, unit: number): string;
+ }
+
+ export interface CountdownStatic {
+ (start: DateTime, end?: DateTime, units?: number, max?: number, digits?: number): Timespan | number;
+ MILLENNIA: number;
+ CENTURIES: number;
+ DECADES: number;
+ YEARS: number;
+ MONTHS: number;
+ WEEKS: number;
+ DAYS: number;
+ HOURS: number;
+ MINUTES: number;
+ SECONDS: number;
+ MILLISECONDS: number;
+ ALL: number;
+ DEFAULTS: number;
+ resetLabels(): void;
+ setLabels(
+ singular?: string,
+ plural?: string,
+ last?: string,
+ delim?: string,
+ empty?: string,
+ formatNumber?: (value: number) => string,
+ formatter?: (value: number, unit: number) => string
+ ): void;
+ resetFormat(): void;
+ setFormat(format: Format): void;
+ }
+
+ export let countdown: CountdownStatic;
+}
From 1f9a2508cfa95d990825dd3cd222d658fd403f79 Mon Sep 17 00:00:00 2001
From: Ray Singer
Date: Sun, 24 Jul 2016 18:33:08 +1200
Subject: [PATCH 35/81] Update orientation type from number to string (#10215)
When using this d.ts file I was getting a TS2345 error: Type 'string' is not assignable to type 'number'. Looks like it was just a copy and paste error or something. I've changed it from number to string.
---
bootstrap-slider/bootstrap-slider.d.ts | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/bootstrap-slider/bootstrap-slider.d.ts b/bootstrap-slider/bootstrap-slider.d.ts
index 77a5177fa0..d830e3c45a 100644
--- a/bootstrap-slider/bootstrap-slider.d.ts
+++ b/bootstrap-slider/bootstrap-slider.d.ts
@@ -35,7 +35,7 @@ interface SliderOptions {
* Default: 'horizontal'
* set the orientation. Accepts 'vertical' or 'horizontal'
*/
- orientation?: number;
+ orientation?: string;
/**
* Default: 5
* initial value. Use array to have a range slider.
From ec2a478b24299379d932783c8aacdc4a3700cb71 Mon Sep 17 00:00:00 2001
From: ersimont
Date: Sun, 24 Jul 2016 02:33:59 -0400
Subject: [PATCH 36/81] Update chai-jquery.d.ts (#10214)
---
chai-jquery/chai-jquery.d.ts | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/chai-jquery/chai-jquery.d.ts b/chai-jquery/chai-jquery.d.ts
index 3d287f30fc..e7256bb7ab 100644
--- a/chai-jquery/chai-jquery.d.ts
+++ b/chai-jquery/chai-jquery.d.ts
@@ -17,7 +17,7 @@ declare namespace Chai {
html(html: string): Assertion;
text(text: string): Assertion;
value(text: string): Assertion;
- (selector: string): Assertion;
+ descendants(selector: string): Assertion;
visible: Assertion;
hidden: Assertion;
selected: Assertion;
From d55ed5d0f1050b88323b30971bcea0fd644d5454 Mon Sep 17 00:00:00 2001
From: Tim Schubert
Date: Sun, 24 Jul 2016 16:34:39 +1000
Subject: [PATCH 37/81] angularjs - Added optional interceptorFn and
expensiveChecks parameters to IParseService (#10213)
---
angularjs/angular-tests.ts | 6 ++++++
angularjs/angular.d.ts | 2 +-
angularjs/legacy/angular-1.4.d.ts | 2 +-
3 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/angularjs/angular-tests.ts b/angularjs/angular-tests.ts
index 10d3b17eda..ef3e29b4c8 100644
--- a/angularjs/angular-tests.ts
+++ b/angularjs/angular-tests.ts
@@ -1098,6 +1098,12 @@ function parseTyping() {
}
}
+function parseWithParams() {
+ var $parse: angular.IParseService;
+ var compiledExp = $parse('a.b.c', () => null);
+ var compiledExp = $parse('a.b.c', null, false);
+}
+
function doBootstrap(element: Element | JQuery, mode: string): ng.auto.IInjectorService {
if (mode === 'debug') {
return angular.bootstrap(element, ['main', function($provide: ng.auto.IProvideService) {
diff --git a/angularjs/angular.d.ts b/angularjs/angular.d.ts
index 82cce46541..5aa6807605 100644
--- a/angularjs/angular.d.ts
+++ b/angularjs/angular.d.ts
@@ -873,7 +873,7 @@ declare namespace angular {
// see http://docs.angularjs.org/api/ng.$parseProvider
///////////////////////////////////////////////////////////////////////////
interface IParseService {
- (expression: string): ICompiledExpression;
+ (expression: string, interceptorFn?: (value: any, scope: IScope, locals: any) => any, expensiveChecks?: boolean): ICompiledExpression;
}
interface IParseProvider {
diff --git a/angularjs/legacy/angular-1.4.d.ts b/angularjs/legacy/angular-1.4.d.ts
index 22c504712e..2cb129dca1 100644
--- a/angularjs/legacy/angular-1.4.d.ts
+++ b/angularjs/legacy/angular-1.4.d.ts
@@ -886,7 +886,7 @@ declare namespace angular {
// see http://docs.angularjs.org/api/ng.$parseProvider
///////////////////////////////////////////////////////////////////////////
interface IParseService {
- (expression: string): ICompiledExpression;
+ (expression: string, interceptorFn?: (value: any, scope: IScope, locals: any) => any, expensiveChecks?: boolean): ICompiledExpression;
}
interface IParseProvider {
From feba22125aaa49e8134705443c9f3fbfaca7d6b8 Mon Sep 17 00:00:00 2001
From: Jeongho Nam
Date: Sun, 24 Jul 2016 15:36:10 +0900
Subject: [PATCH 38/81] TypeScript-STL v1.0 RC-5 (#10211)
* Node-Scanf
* TypeScript-STL v1 RC-5
---
typescript-stl/typescript-stl.d.ts | 593 +++++++++++++++++++++--------
1 file changed, 435 insertions(+), 158 deletions(-)
diff --git a/typescript-stl/typescript-stl.d.ts b/typescript-stl/typescript-stl.d.ts
index 9baa19ec30..a0f92b88b6 100644
--- a/typescript-stl/typescript-stl.d.ts
+++ b/typescript-stl/typescript-stl.d.ts
@@ -1,5 +1,5 @@
-// Type definitions for TypeScript-STL v1.0.0-rc.2
-// Project: https://github.com/samchon/stl
+// Type definitions for TypeScript-STL v1.0.0-rc.3
+// Project: https://github.com/samchon/typescript-stl
// Definitions by: Jeongho Nam
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
@@ -13,16 +13,102 @@ declare module "typescript-stl"
*
STL (Standard Template Library) Containers and Algorithms for TypeScript.
*
*
TypeScript-STL is a TypeScript's Standard Template Library who is migrated from C++ STL. Most of classes
* and functions of STL have implemented. Just enjoy it.
*
+ * @git https://github.com/samchon/typescript-stl
* @author Jeongho Nam
*/
declare namespace std {
+ /**
+ * Type definition of {@link Vector} and it's the original name used in C++.
+ */
+ export import vector = Vector;
+ /**
+ * Type definition of {@link List} and it's the original name used in C++.
+ */
+ export import list = List;
+ /**
+ * Type definition of {@link Deque} and it's the original name used in C++.
+ */
+ export import deque = Deque;
+ /**
+ * Type definition of {@link Stack} and it's the original name used in C++.
+ */
+ type stack = Stack;
+ /**
+ * Type definition of {@link Queue} and it's the original name used in C++.
+ */
+ type queue = Queue;
+ /**
+ * Type definition of {@link PriorityQueue} and it's the original name used in C++.
+ */
+ type priority_queue = PriorityQueue;
+ var stack: typeof Stack;
+ var queue: typeof Queue;
+ var priority_queue: typeof PriorityQueue;
+ /**
+ * Type definition of {@link TreeSet} and it's the original name used in C++.
+ */
+ export import set = TreeSet;
+ /**
+ * Type definition of {@link TreeMultiSet} and it's the original name used in C++.
+ */
+ export import multiset = TreeMultiSet;
+ /**
+ * Type definition of {@link HashSet} and it's the original name used in C++.
+ */
+ export import unordered_set = HashSet;
+ /**
+ * Type definition of {@link HashMultiSet} and it's the original name used in C++.
+ */
+ export import unordered_multiset = HashMultiSet;
+ /**
+ * Type definition of {@link TreeMap} and it's the original name used in C++.
+ */
+ export import map = TreeMap;
+ /**
+ * Type definition of {@link TreeMultiMap} and it's the original name used in C++.
+ */
+ export import multimap = TreeMultiMap;
+ /**
+ * Type definition of {@link HashMap} and it's the original name used in C++.
+ */
+ export import unordered_map = HashMap;
+ /**
+ * Type definition of {@link HashMultiMap} and it's the original name used in C++.
+ */
+ export import unordered_multimap = HashMultiMap;
+ type exception = Exception;
+ type logic_error = LogicError;
+ type domain_error = DomainError;
+ type invalid_argument = InvalidArgument;
+ type length_error = LengthError;
+ type out_of_range = OutOfRange;
+ type runtime_error = RuntimeError;
+ type overflow_error = OverflowError;
+ type underflow_error = UnderflowError;
+ type range_error = RangeError;
+ type system_error = SystemError;
+ type error_category = ErrorCategory;
+ type error_condition = ErrorCondition;
+ type error_code = ErrorCode;
+ var exception: typeof Exception;
+ var logic_error: typeof LogicError;
+ var domain_error: typeof DomainError;
+ var invalid_argument: typeof InvalidArgument;
+ var length_error: typeof LengthError;
+ var out_of_range: typeof OutOfRange;
+ var runtime_error: typeof RuntimeError;
+ var overflow_error: typeof OverflowError;
+ var underflow_error: typeof UnderflowError;
+ var range_error: typeof RangeError;
+ var system_error: typeof SystemError;
+ var error_category: typeof ErrorCategory;
+ var error_condition: typeof ErrorCondition;
+ var error_code: typeof ErrorCode;
}
/**
* Base classes composing STL in background.
@@ -2665,9 +2751,9 @@ declare namespace std.base {
/**
*
There is not a single type of {@link Iterator bidirectional iterator}: {@link IContainer Each container}
* may define its own specific iterator type able to iterate through it and access its elements.
*
* @reference http://www.cplusplus.com/reference/iterator/BidirectionalIterator
@@ -2872,8 +2958,8 @@ declare namespace std {
* first element in a range is reversed, the reversed iterator points to the element before the first element (this
* would be the past-the-end element of the reversed range).
@@ -3104,8 +3194,8 @@ declare namespace std {
* the end, {@link Deque Deques} perform worse and have less consistent iterators and references than
* {@link List Lists}.
*
* @param Type of the elements.
@@ -3543,8 +3629,8 @@ declare namespace std {
*
All objects thrown by components of the standard library are derived from this class.
* Therefore, all standard exceptions can be caught by catching this type by reference.
It is a standard exception that can be thrown by programs. Some components of the standard library
* also throw exceptions of this type to signal invalid arguments.
It is a standard exception that can be thrown by programs. Some components of the standard library,
* such as vector and string also throw exceptions of this type to signal errors resizing.
*
* @reference http://www.cplusplus.com/reference/stdexcept/length_error
* @author Jeongho Nam
@@ -3685,8 +3771,8 @@ declare namespace std {
* such as vector, deque, string and bitset also throw exceptions of this type to signal arguments
* out of range.
It is a standard exception that can be thrown by programs. Some components of the standard library
* also throw exceptions of this type to signal range errors.
It is a standard exception that can be thrown by programs. Some components of the standard library
* also throw exceptions of this type to signal range errors.
*
* @reference http://www.cplusplus.com/reference/stdexcept/range_error
* @author Jeongho Nam
@@ -4336,8 +4422,8 @@ declare namespace std.base {
* {@link List} and registering {@link ListIterator iterators} of the {@link data_ list container} to an index
* table like {@link RBTree tree} or {@link HashBuckets hash-table}.
*
* @author Jeongho Nam
*/
@@ -4849,8 +4931,8 @@ declare namespace std.base {
* {@link List} and registering {@link ListIterator iterators} of the {@link data_ list container} to an index
* table like {@link RBTree tree} or {@link HashBuckets hash-table}.
Extracts the element pointed to by key and erases it from the {@link UniqueMap}.
+ *
+ * @param key Key value of the element whose mapped value is accessed.
+ *
+ * @return A {@link Pair} containing the value pointed to by key.
+ */
+ extract(key: Key): Pair;
+ /**
+ *
Extract an element.
+ *
+ *
Extracts the element pointed to by key and erases it from the {@link UniqueMap}.
+ *
+ * @param it An iterator pointing an element to extract.
+ *
+ * @return An iterator pointing to the element immediately following it prior to the element being
+ * erased. If no such element exists,returns {@link end end()}.
+ */
+ extract(it: MapIterator): MapIterator;
+ /**
+ *
Extract an element.
+ *
+ *
Extracts the element pointed to by key and erases it from the {@link UniqueMap}.
+ *
+ * @param it An iterator pointing an element to extract.
+ *
+ * @return An iterator pointing to the element immediately following it prior to the element being
+ * erased. If no such element exists,returns {@link end end()}.
+ */
+ extract(it: MapReverseIterator): MapReverseIterator;
+ /**
+ * @hidden
+ */
+ private extract_by_key(key);
+ /**
+ * @hidden
+ */
+ private extract_by_iterator(it);
+ /**
+ * @hidden
+ */
+ private extract_by_reverse_iterator(it);
/**
*
Inserts an element or assigns to the current element if the key already exists.
+ *
+ *
Because element keys in a {@link UniqueMap} are unique, the insertion operation checks whether
+ * each inserted element has a key equivalent to the one of an element already in the container, and
+ * if so, the element is assigned, returning an iterator to this existing element (if the function returns a
+ * value).
+ *
+ *
For a similar container allowing for duplicate elements, see {@link MultiMap}.
+ *
+ * @param key The key used both to look up and to insert if not found.
+ * @param value Value, the item.
+ *
+ * @return A {@link Pair}, with its member {@link Pair.first} set to an iterator pointing to either the newly
+ * inserted element or to the element with an equivalent key in the {@link UniqueMap}. The
+ * {@link Pair.second} element in the {@link Pair} is set to true if a new element was inserted or
+ * false if an equivalent key already existed so the value is assigned.
+ */
+ insert_or_assign(key: Key, value: T): Pair, boolean>;
+ /**
+ *
Insert or assign an element.
+ *
+ *
Inserts an element or assigns to the current element if the key already exists.
+ *
+ *
Because element keys in a {@link UniqueMap} are unique, the insertion operation checks whether
+ * each inserted element has a key equivalent to the one of an element already in the container, and
+ * if so, the element is assigned, returning an iterator to this existing element (if the function returns a
+ * value).
+ *
+ *
For a similar container allowing for duplicate elements, see {@link MultiMap}.
+ *
+ * @param hint Hint for the position where the element can be inserted.
+ * @param key The key used both to look up and to insert if not found.
+ * @param value Value, the item.
+ *
+ * @return An iterator pointing to either the newly inserted element or to the element that already had an
+ * equivalent key in the {@link UniqueMap}.
+ */
+ insert_or_assign(hint: MapIterator, key: Key, value: T): MapIterator;
+ /**
+ *
Insert or assign an element.
+ *
+ *
Inserts an element or assigns to the current element if the key already exists.
+ *
+ *
Because element keys in a {@link UniqueMap} are unique, the insertion operation checks whether
+ * each inserted element has a key equivalent to the one of an element already in the container, and
+ * if so, the element is assigned, returning an iterator to this existing element (if the function returns a
+ * value).
+ *
+ *
For a similar container allowing for duplicate elements, see {@link MultiMap}.
+ *
+ * @param hint Hint for the position where the element can be inserted.
+ * @param key The key used both to look up and to insert if not found.
+ * @param value Value, the item.
+ *
+ * @return An iterator pointing to either the newly inserted element or to the element that already had an
+ * equivalent key in the {@link UniqueMap}.
+ */
+ insert_or_assign(hint: MapReverseIterator, key: Key, value: T): MapReverseIterator;
+ /**
+ * @hidden
+ */
+ private insert_or_assign_with_key_value(key, value);
+ /**
+ * @hidden
+ */
+ private insert_or_assign_with_hint(hint, key, value);
/**
*
Swap content.
*
@@ -5003,8 +5198,8 @@ declare namespace std.base {
* {@link List} and registering {@link ListIterator iterators} of the {@link data_ list container} to an index
* table like {@link RBTree tree} or {@link HashBuckets hash-table}.
{@link HashMap} containers are faster than {@link TreeMap} containers to access individual elements by their
* key, although they are generally less efficient for range iteration through a subset of their elements.
Elements with equivalent keys are grouped together in the same bucket and in such a way that
* an iterator can iterate through all of them. Iterators in the container are doubly linked iterators.
@@ -5428,8 +5633,8 @@ declare namespace std.base {
* {@link List} and registering {@link ListIterator iterators} of the {@link data_ list container} to an index
* table like {@link RBTree tree} or {@link HashBuckets hash-table}.
*
- *
*
* @param Type of the elements.
*
@@ -5798,8 +5999,8 @@ declare namespace std.base {
* {@link List} and registering {@link ListIterator iterators} of the {@link data_ list container} to an index
* table like {@link RBTree tree} or {@link HashBuckets hash-table}.
*
- *
Extracts the element pointed to by val and erases it from the {@link UniqueSet}.
+ *
+ * @param val Value to be extracted.
+ *
+ * @return A value.
+ */
+ extract(val: T): T;
+ /**
+ *
Extract an element.
+ *
+ *
Extracts the element pointed to by key and erases it from the {@link UniqueMap}.
+ *
+ * @param it An iterator pointing an element to extract.
+ *
+ * @return An iterator pointing to the element immediately following it prior to the element being
+ * erased. If no such element exists,returns {@link end end()}.
+ */
+ extract(it: SetIterator): SetIterator;
+ /**
+ *
Extract an element.
+ *
+ *
Extracts the element pointed to by key and erases it from the {@link UniqueMap}.
+ *
+ * @param it An iterator pointing an element to extract.
+ *
+ * @return An iterator pointing to the element immediately following it prior to the element being
+ * erased. If no such element exists,returns {@link end end()}.
+ */
+ extract(it: SetReverseIterator): SetReverseIterator;
+ /**
+ * @hidden
+ */
+ private extract_by_key(val);
+ /**
+ * @hidden
+ */
+ private extract_by_iterator(it);
+ /**
+ * @hidden
+ */
+ private extract_by_reverse_iterator(it);
/**
*
Insert an element.
*
@@ -5879,8 +6124,8 @@ declare namespace std.base {
* {@link List} and registering {@link ListIterator iterators} of the {@link data_ list container} to an index
* table like {@link RBTree tree} or {@link HashBuckets hash-table}.
*
- *
@@ -5951,8 +6200,8 @@ declare namespace std {
* elements by their key, although they are generally less efficient for range iteration through a
* subset of their elements.
*
- *
Elements with equivalent values are grouped together in the same bucket and in such a way that an
* iterator can iterate through all of them. Iterators in the container are doubly linked iterators.
@@ -6266,8 +6523,8 @@ declare namespace std {
* distance between these. They also consume some extra memory to keep the linking information associated to each
* element (which may be an important factor for large lists of small-sized elements).
*
- *
*
* @param Type of the elements.
@@ -6951,8 +7208,8 @@ declare namespace std {
* By default, if no container class is specified for a particular {@link Queue} class instantiation, the standard
* container {@link List} is used.
*
* @param Type of elements.
@@ -7283,8 +7540,8 @@ declare namespace std {
* By default, if no container class is specified for a particular {@link Stack} class instantiation, the standard
* container {@link List} is used.
*
* @param Type of elements.
@@ -7394,8 +7651,8 @@ declare namespace std.base {
* so that they can be interpreted when needed as more abstract (and portable)
* {@link ErrorCondition error conditions}.
*
* @reference http://www.cplusplus.com/reference/system_error/system_error
* @author Jeongho Nam
@@ -7570,8 +7827,8 @@ declare namespace std {
* passed by reference. As such, only one object of each of these types shall exist, each uniquely identifying its own
* category: all error codes and conditions of a same category shall return a reference to same object.
Objects of this class associate such numerical codes to {@link ErrorCategory error categories}, so that they
* can be interpreted when needed as more abstract (and portable) {@link ErrorCondition error conditions}.
@@ -8454,8 +8727,8 @@ declare namespace std {
* T2). The individual values can be accessed through its public members {@link first} and
* {@link second}.
*
- * @param Type of member {@link first}.
- * @param Type of member {@link second}.
+ * @param Type of member {@link first}.
+ * @param Type of member {@link second}.
*
* @reference http://www.cplusplus.com/reference/utility/pair
* @author Jeongho Nam
@@ -8509,6 +8782,10 @@ declare namespace std {
*/
function make_pair(x: T1, y: T2): Pair;
}
+declare namespace std.Vector {
+ type iterator = std.VectorIterator;
+ type reverse_iterator = std.VectorReverseIterator;
+}
declare namespace std {
/**
*
Vector, the dynamic array.
@@ -8541,9 +8818,9 @@ declare namespace std {
* end, they perform worse than the others, and have less consistent iterators and references than {@link List}s.
*
*
- *
*
* @param Type of the elements.
@@ -9127,8 +9400,9 @@ declare namespace std.base {
*
Elements with equivalent keys are grouped together in the same bucket and in such a way that
* an iterator can iterate through all of them. Iterators in the container are doubly linked iterators.
*
* @author Jeongho Nam
*/
@@ -9452,8 +9727,9 @@ declare namespace std.base {
* elements by their key, although they are generally less efficient for range iteration through a
* subset of their elements.
*
* @author Jeongho Nam
*/
@@ -9716,9 +9993,9 @@ declare namespace std.base {
* beginning or the end, {@link IArray} objects perform worse and have less consistent iterators and references
* than {@link List Lists}
There is not a single type of {@link IArrayIterator random-access iterator}: Each container may define its
* own specific iterator type able to iterate through it and access its elements.
{@link IContainer} is an interface designed for sequence containers. Sequence containers of STL
* (Standard Template Library) are based on the {@link IContainer}.
These constraints enforce a critical property of red-black trees: the path from the root to the farthest
@@ -10440,7 +10717,7 @@ declare namespace std.base {
* the only loop, and any rotations occur after this loop, this proves that a constant number of rotations
* occur.
*
- *
*
* @param N A node to be inserted or swapped.
@@ -10474,7 +10751,7 @@ declare namespace std.base {
* node are black) is still violated, but now we can resolve this by
* continuing to case 5.
*
- *
*
* @param N A node to be inserted or swapped.
@@ -10505,7 +10782,7 @@ declare namespace std.base {
* through {@link XTreeNode.parent P}. In each case, this is the only
* black node of the three.
*
- *
*
* @param N A node to be inserted or swapped.
@@ -10659,7 +10936,7 @@ declare namespace std.base {
/**
*
{@link XTreeNode.sibling S} is red.
*
- *
*
*
In this case we reverse the colors of {@link XTreeNode.parent P} and
@@ -10681,7 +10958,7 @@ declare namespace std.base {
*
{@link XTreeNode.parent P}, {@link XTreeNode.sibling S}, and {@link XTreeNode.sibling
* S}'s children are black.
*
- *
*
*
In this case, we simply repaint {@link XTreeNode.sibling S} red. The
@@ -10705,7 +10982,7 @@ declare namespace std.base {
*
{@link XTreeNode.sibling S} and {@link XTreeNode.sibling S}'s children are
* black, but {@link XTreeNode.parent P} is red.
*
- *
*
*
In this case, we simply exchange the colors of {@link XTreeNode.sibling S} and
@@ -10722,7 +10999,7 @@ declare namespace std.base {
* left child is red, {@link XTreeNode.sibling S}'s right child is
* black, and N is the left child of its parent.
*
- *
*
*
In this case we rotate right at {@link XTreeNode.sibling S}, so that
@@ -10761,7 +11038,7 @@ declare namespace std.base {
*
Thus, the paths passing through N pass through one additional
* black node.
*
- *
*
*
Meanwhile, if a path does not go through N, then there are two possibilities: