From 6d12ed32ba5a7b65b7ac5069f22794ae13174120 Mon Sep 17 00:00:00 2001 From: Peter Safranek Date: Sat, 8 Oct 2016 01:14:55 -0700 Subject: [PATCH 001/100] Add type definitions for koa-send. --- koa-send/koa-send-tests.ts | 23 +++++++++++++++++++++++ koa-send/koa-send.d.ts | 27 +++++++++++++++++++++++++++ 2 files changed, 50 insertions(+) create mode 100644 koa-send/koa-send-tests.ts create mode 100644 koa-send/koa-send.d.ts diff --git a/koa-send/koa-send-tests.ts b/koa-send/koa-send-tests.ts new file mode 100644 index 0000000000..630bdcbddb --- /dev/null +++ b/koa-send/koa-send-tests.ts @@ -0,0 +1,23 @@ +/// +/// + +import * as Koa from "koa"; +import * as send from "koa-send"; + +const app = new Koa(); + +app.use(async (ctx: Koa.Context) => { + const path: string = await send(ctx, 'stimpy.html'); +}); + +app.use(async (ctx: Koa.Context) => { + await send(ctx, 'stimpy.html', { + root: '../static-files', + index: 'index.html', + maxAge: 10, + hidden: true, + format: true, + gzip: true, + setHeaders: () => {}, + }); +}); diff --git a/koa-send/koa-send.d.ts b/koa-send/koa-send.d.ts new file mode 100644 index 0000000000..9ed8805412 --- /dev/null +++ b/koa-send/koa-send.d.ts @@ -0,0 +1,27 @@ +// Type definitions for koa-send v3.x +// Project: https://github.com/koajs/send +// Definitions by: Peter Safranek +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/// + +declare module "koa-send" { + + import * as Koa from "koa"; + + interface ISendOptions { + root?: string; + index?: string; + maxAge?: number; + hidden?: boolean; + format?: boolean; + gzip?: boolean; + setHeaders?: Function; + } + + function send(ctx: Koa.Context, path: string, opts?: ISendOptions): Promise; + + namespace send {} + + export = send; +} From 462a3e448eb05053ef82c28dc825e218d67ca71e Mon Sep 17 00:00:00 2001 From: Jough Dempsey Date: Tue, 13 Dec 2016 17:13:06 -0600 Subject: [PATCH 002/100] Add ReadonlyArray as an alterative type for $inject. It may be prudent to make injected dependencies immutable, but we can't Object.freeze() or use the Readonly interfae for our dependency array if $inject only accepts a mutable array of strings. --- angular/index.d.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/angular/index.d.ts b/angular/index.d.ts index 4b85c4a804..4a9445962d 100644 --- a/angular/index.d.ts +++ b/angular/index.d.ts @@ -10,7 +10,7 @@ declare var angular: angular.IAngularStatic; // Support for painless dependency injection declare global { interface Function { - $inject?: string[]; + $inject?: string[] | ReadonlyArray; } } @@ -1205,7 +1205,7 @@ declare namespace angular { debugInfoEnabled(): boolean; debugInfoEnabled(enabled: boolean): ICompileProvider; - + /** * Sets the number of times $onChanges hooks can trigger new changes before giving up and assuming that the model is unstable. * Increasing the TTL could have performance implications, so you should not change it without proper justification. @@ -1214,7 +1214,7 @@ declare namespace angular { */ onChangesTtl(): number; onChangesTtl(limit: number): ICompileProvider; - + /** * It indicates to the compiler whether or not directives on comments should be compiled. * It results in a compilation performance gain since the compiler doesn't have to check comments when looking for directives. @@ -1223,7 +1223,7 @@ declare namespace angular { */ commentDirectivesEnabled(): boolean; commentDirectivesEnabled(enabled: boolean): ICompileProvider; - + /** * It indicates to the compiler whether or not directives on element classes should be compiled. * It results in a compilation performance gain since the compiler doesn't have to check element classes when looking for directives. From 763a5e57a8e1285bbec15faba46668f2d9e747c3 Mon Sep 17 00:00:00 2001 From: cervengoc Date: Thu, 5 Jan 2017 11:11:47 +0100 Subject: [PATCH 003/100] Add ko.ignoreDependencies --- knockout/index.d.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/knockout/index.d.ts b/knockout/index.d.ts index 3d1b51f249..a28d06a220 100644 --- a/knockout/index.d.ts +++ b/knockout/index.d.ts @@ -529,6 +529,8 @@ interface KnockoutStatic { renderTemplateForEach(template: Function, arrayOrObservableArray: KnockoutObservable, options: Object, targetNode: Node, parentBindingContext: KnockoutBindingContext): any; renderTemplateForEach(template: any, arrayOrObservableArray: KnockoutObservable, options: Object, targetNode: Node, parentBindingContext: KnockoutBindingContext): any; + ignoreDependencies(callback: () => T): T; + expressionRewriting: { bindingRewriteValidators: any[]; twoWayBindings: any; From 83d9597309ff7eefdb32ac58db1b0ca6c838bf60 Mon Sep 17 00:00:00 2001 From: Rafael Salguero Iturrios Date: Sat, 7 Jan 2017 18:58:36 -0700 Subject: [PATCH 004/100] x y properties on Point --- leaflet/index.d.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/leaflet/index.d.ts b/leaflet/index.d.ts index fdaea84934..05950dc68c 100644 --- a/leaflet/index.d.ts +++ b/leaflet/index.d.ts @@ -186,6 +186,8 @@ declare namespace L { equals(otherPoint: PointExpression): boolean; contains(otherPoint: PointExpression): boolean; toString(): string; + x: number; + y: number; } type PointExpression = Point | PointTuple; From b259e475a5fe2737925c146caaf38aad1f32e8c3 Mon Sep 17 00:00:00 2001 From: Andy Date: Sun, 8 Jan 2017 05:14:37 -0800 Subject: [PATCH 005/100] update-notifier: Add `export =` declaration (#13839) --- scripts/lint.js | 2 +- update-notifier/index.d.ts | 80 +++++++++++++----------- update-notifier/tslint.json | 1 + update-notifier/update-notifier-tests.ts | 8 +-- 4 files changed, 49 insertions(+), 42 deletions(-) create mode 100644 update-notifier/tslint.json diff --git a/scripts/lint.js b/scripts/lint.js index ade9a6b719..ea3ec1d778 100644 --- a/scripts/lint.js +++ b/scripts/lint.js @@ -8,7 +8,7 @@ const path = require("path"); const symlinkedTslintPath = "../node_modules/types-publisher/node_modules/tslint" let tslintPath = existsSync(path.join(pkg, symlinkedTslintPath)) ? symlinkedTslintPath : "../node_modules/tslint"; // An older version (e.g. abs/v0) is in a nested directory, so needs to look one more level up for tslint. -if (pkg.includes("/")) { +if (pkg.includes("/") && pkg[pkg.length - 1] !== "/") { tslintPath = path.join("..", tslintPath); } diff --git a/update-notifier/index.d.ts b/update-notifier/index.d.ts index 6249f8e902..d9d6c8a4cc 100644 --- a/update-notifier/index.d.ts +++ b/update-notifier/index.d.ts @@ -1,47 +1,53 @@ -// Type definitions for update-notifier +// Type definitions for update-notifier 1.0 // Project: https://github.com/yeoman/update-notifier // Definitions by: vvakame , Noah Chen // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -export interface ISettings { - pkg?: IPackage; - callback?: (update?: IUpdateInfo) => any; - packageName?: string; - packageVersion?: string; - updateCheckInterval?: number; // in milliseconds, default 1000 * 60 * 60 * 24 (1 day) -} +export = UpdateNotifier; -export interface IBoxenOptions { - padding: number; - margin: number; - align: string; - borderColor: string; - borderStyle: string; -} +declare function UpdateNotifier(settings?: UpdateNotifier.Settings): UpdateNotifier.UpdateNotifier; -export interface INotifyOptions { - message: string; - defer?: boolean; - boxenOpts?: IBoxenOptions; -} +declare namespace UpdateNotifier { + class UpdateNotifier { + constructor(settings?: UpdateNotifier.Settings); -export interface IPackage { - name: string; - version: string; -} + update: UpdateNotifier.UpdateInfo; + check(): void; + checkNpm(): void; + notify(customMessage?: UpdateNotifier.NotifyOptions): void; + } -export interface IUpdateInfo { - latest: string; - current: string; - type: string; - name: string; -} + interface Settings { + pkg?: Package; + callback?: (update?: UpdateInfo) => any; + packageName?: string; + packageVersion?: string; + updateCheckInterval?: number; // in milliseconds, default 1000 * 60 * 60 * 24 (1 day) + } -export declare class UpdateNotifier { - constructor(settings?: ISettings); - - update: IUpdateInfo; - check(): void; - checkNpm(): void; - notify(customMessage?: INotifyOptions): void; + interface BoxenOptions { + padding: number; + margin: number; + align: string; + borderColor: string; + borderStyle: string; + } + + interface NotifyOptions { + message: string; + defer?: boolean; + boxenOpts?: BoxenOptions; + } + + interface Package { + name: string; + version: string; + } + + interface UpdateInfo { + latest: string; + current: string; + type: string; + name: string; + } } diff --git a/update-notifier/tslint.json b/update-notifier/tslint.json new file mode 100644 index 0000000000..2221e40e4a --- /dev/null +++ b/update-notifier/tslint.json @@ -0,0 +1 @@ +{ "extends": "../tslint.json" } \ No newline at end of file diff --git a/update-notifier/update-notifier-tests.ts b/update-notifier/update-notifier-tests.ts index 0bca5a85ca..a39ead18ea 100644 --- a/update-notifier/update-notifier-tests.ts +++ b/update-notifier/update-notifier-tests.ts @@ -1,7 +1,6 @@ +import UpdateNotifier = require("update-notifier"); -import { UpdateNotifier } from "update-notifier"; - -var notifier = new UpdateNotifier(); +var notifier = UpdateNotifier(); if (notifier.update) { notifier.notify(); @@ -9,7 +8,8 @@ if (notifier.update) { console.log(notifier.update); -var notifier = new UpdateNotifier({ +// Also exposed as a class +var notifier = new UpdateNotifier.UpdateNotifier({ updateCheckInterval: 1000 * 60 * 60 * 24 * 7 // 1 week }); From d67e721495d54d8908a3faa16afc34d04b3b514f Mon Sep 17 00:00:00 2001 From: Jay Anslow Date: Sun, 8 Jan 2017 20:27:11 +0000 Subject: [PATCH 006/100] Add definitions for git-remote-origin-url (#13845) --- .../git-remote-origin-url-tests.ts | 4 ++++ git-remote-origin-url/index.d.ts | 8 ++++++++ git-remote-origin-url/tsconfig.json | 20 +++++++++++++++++++ git-remote-origin-url/tslint.json | 1 + 4 files changed, 33 insertions(+) create mode 100644 git-remote-origin-url/git-remote-origin-url-tests.ts create mode 100644 git-remote-origin-url/index.d.ts create mode 100644 git-remote-origin-url/tsconfig.json create mode 100644 git-remote-origin-url/tslint.json diff --git a/git-remote-origin-url/git-remote-origin-url-tests.ts b/git-remote-origin-url/git-remote-origin-url-tests.ts new file mode 100644 index 0000000000..30b5541ab4 --- /dev/null +++ b/git-remote-origin-url/git-remote-origin-url-tests.ts @@ -0,0 +1,4 @@ +import gitRemoteOriginUrl = require('git-remote-origin-url'); + +const url1: Promise = gitRemoteOriginUrl(); +const url2: Promise = gitRemoteOriginUrl('my-custom-path'); diff --git a/git-remote-origin-url/index.d.ts b/git-remote-origin-url/index.d.ts new file mode 100644 index 0000000000..6d648dc322 --- /dev/null +++ b/git-remote-origin-url/index.d.ts @@ -0,0 +1,8 @@ +// Type definitions for git-remote-origin-url 2.0 +// Project: https://github.com/sindresorhus/git-remote-origin-url#readme +// Definitions by: Jay Anslow +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +declare function gitRemoteOriginUrl(cwd?: string): Promise; + +export = gitRemoteOriginUrl; diff --git a/git-remote-origin-url/tsconfig.json b/git-remote-origin-url/tsconfig.json new file mode 100644 index 0000000000..2abc29a970 --- /dev/null +++ b/git-remote-origin-url/tsconfig.json @@ -0,0 +1,20 @@ +{ + "compilerOptions": { + "module": "commonjs", + "target": "es6", + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "git-remote-origin-url-tests.ts" + ] +} diff --git a/git-remote-origin-url/tslint.json b/git-remote-origin-url/tslint.json new file mode 100644 index 0000000000..377cc837d4 --- /dev/null +++ b/git-remote-origin-url/tslint.json @@ -0,0 +1 @@ +{ "extends": "../tslint.json" } From d33f09009e26d84eb3b61629b250fc333b51ddb3 Mon Sep 17 00:00:00 2001 From: Brendan Forster Date: Mon, 9 Jan 2017 12:20:28 +1100 Subject: [PATCH 007/100] add walk and walkSync to fs-extra (#13103) * add signature for walkSync * flesh out the response definitions * added example tests * signature changes to let PathEntryStream flow --- fs-extra/fs-extra-tests.ts | 24 +++++++++++++++++++++++ fs-extra/index.d.ts | 40 ++++++++++++++++++++++++++++++++++++-- 2 files changed, 62 insertions(+), 2 deletions(-) diff --git a/fs-extra/fs-extra-tests.ts b/fs-extra/fs-extra-tests.ts index 0954fcaf47..896d6411f7 100644 --- a/fs-extra/fs-extra-tests.ts +++ b/fs-extra/fs-extra-tests.ts @@ -2,6 +2,7 @@ /// import fs = require('fs-extra'); +import * as Path from 'path' var src: string; var dest: string; @@ -110,3 +111,26 @@ fs.walk("my-path") .on('end', function () { console.dir(items); }); + +const ignoreHiddenFiles = (item: string): boolean => { + const basename = Path.basename(item) + return basename === '.' || basename[0] !== '.' +} + +const sortPaths = (left: string, right: string) => left.localeCompare(right); + +const options = { + filter: ignoreHiddenFiles, + pathSorter: sortPaths +} + +fs.walk(path, options) + .on('readable', function (this: fs.PathEntryStream) { + let item: fs.PathEntry | undefined + while ((item = this.read())) { + items.push(item.path) + } + }) + .on('end', function () { + + }) diff --git a/fs-extra/index.d.ts b/fs-extra/index.d.ts index a6ac95bfc8..2cc47724c8 100644 --- a/fs-extra/index.d.ts +++ b/fs-extra/index.d.ts @@ -7,8 +7,8 @@ /// -import * as stream from 'stream'; import { Stats } from "fs"; + export * from "fs"; export declare function copy(src: string, dest: string, callback?: (err: Error) => void): void; @@ -76,6 +76,8 @@ export declare function emptyDirSync(path: string): boolean; export interface WalkEventEmitter extends NodeJS.ReadableStream { on(event: 'data', callback: (file: WalkEventFile) => void): this; + on(event: 'readable', callback: (this: PathEntryStream) => void): this; + on(event: 'error', callback: (error: Error, item: PathEntry) => void): this; on(event: 'end', callback: () => void): this; on(event: string | symbol, callback: Function): this; } @@ -85,7 +87,41 @@ export interface WalkEventFile { stats: Stats; } -export function walk(path: string, options?: {}): WalkEventEmitter; +export interface WalkOptions { + /** + * Control how results are enumerated from `readdir`: + * - 'shift' will return the first element from the array. + * - 'pop' will return the last element from the array. + * + * If not specified, the default behaviour is 'shift' + */ + queueMethod?: 'pop' | 'shift'; + /** + * Provide a function to sort the paths before they are enumerated + */ + pathSorter?: (left: string, right: string) => number; + /** + * An optional object to override the default `fs` APIs for testing purposes + */ + fs?: Object; + /** + * Provide a function to exclude certain file paths. The function should + * return true when the element should be kept, and false otherwise. + */ + filter?: (path: string, index: number, array: Array) => boolean; +} + +export type PathEntry = { + path: string; + stats: Stats; +} + +export type PathEntryStream = { + read(): PathEntry | null +} + +export function walk(path: string, options?: WalkOptions): WalkEventEmitter; +export function walkSync(path: string): ReadonlyArray; export interface CopyFilterFunction { (src: string): boolean From e446c1813102a26a7e4b7cb5363704a0713ed52e Mon Sep 17 00:00:00 2001 From: Rafael Salguero Iturrios Date: Sun, 8 Jan 2017 18:21:35 -0700 Subject: [PATCH 008/100] Missing zoom parameter on CRS.pointToLatLng method (#13847) http://leafletjs.com/reference.html#icrs-pointtolatlng --- leaflet/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/leaflet/index.d.ts b/leaflet/index.d.ts index fdaea84934..3e50ded6fd 100644 --- a/leaflet/index.d.ts +++ b/leaflet/index.d.ts @@ -72,7 +72,7 @@ declare namespace L { export interface CRS { latLngToPoint(latlng: LatLngExpression, zoom: number): Point; - pointToLatLng(point: PointExpression): LatLng; + pointToLatLng(point: PointExpression, zoom: number): LatLng; project(latlng: LatLngExpression): Point; unproject(point: PointExpression): LatLng; scale(zoom: number): number; From e93460bfaab9ba4be85a3d70ca05f4b973934634 Mon Sep 17 00:00:00 2001 From: Andy Date: Sun, 8 Jan 2017 17:44:51 -0800 Subject: [PATCH 009/100] Add `charm` types (#13849) --- charm/charm-tests.ts | 25 +++++++ charm/index.d.ts | 154 +++++++++++++++++++++++++++++++++++++++++++ charm/tsconfig.json | 20 ++++++ charm/tslint.json | 6 ++ 4 files changed, 205 insertions(+) create mode 100644 charm/charm-tests.ts create mode 100644 charm/index.d.ts create mode 100644 charm/tsconfig.json create mode 100644 charm/tslint.json diff --git a/charm/charm-tests.ts b/charm/charm-tests.ts new file mode 100644 index 0000000000..0cdbdc8055 --- /dev/null +++ b/charm/charm-tests.ts @@ -0,0 +1,25 @@ +import getCharm = require("charm"); +const charm = getCharm(); +charm.pipe(process.stdout); +charm.reset(); + +var colors: getCharm.CharmColor[] = [ 'red', 'cyan', 'yellow', 'green', 'blue' ]; +var text = 'Always after me lucky charms.'; + +var offset = 0; +var iv = setInterval(function () { + var y = 0, dy = 1; + for (var i = 0; i < 40; i++) { + var color = colors[(i + offset) % colors.length]; + var c = text[(i + offset) % text.length]; + charm + .move(1, dy) + .foreground(color) + .write(c) + ; + y += dy; + if (y <= 0 || y >= 5) dy *= -1; + } + charm.position(0, 1); + offset ++; +}, 150); diff --git a/charm/index.d.ts b/charm/index.d.ts new file mode 100644 index 0000000000..2ce1b9e13a --- /dev/null +++ b/charm/index.d.ts @@ -0,0 +1,154 @@ +// Type definitions for Charm 1.0 +// Project: https://github.com/substack/node-charm/ +// Definitions by: Jad Sarout +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/// + +declare namespace charm { + type CharmColorName = "red" | "yellow" | "green" | "blue" | "cyan" | "magenta" | "black" | "white"; + type CharmColorHex = number; + type CharmColor = CharmColorName | CharmColorHex; + type CharmAnyStream = NodeJS.WritableStream|NodeJS.ReadableStream|NodeJS.Process; + + interface CharmInstance extends NodeJS.WritableStream { + /** Reset the entire screen, like the /usr/bin/reset command. */ + reset(): void; + + /** Emit an "end" event downstream. */ + destroy(): void; + + /** Emit an "end" event downstream. */ + end(): void; + + /** + * Pass along `msg` to the output stream. + * @param cb Unused by charm, only there to comply to the WritableStream interface + */ + write(msg: string | Buffer, cb?: Function): boolean; + write(msgs: string | Buffer, encoding?: string, cb?: Function): boolean; + + /** Set the cursor position to the absolute coordinates `x`, `y`. */ + position(x: number, y: number): void; + + /** + * Query the absolute cursor position from the input stream through the output stream + * (the shell does this automatically) and get the response back as `cb(x, y)`. + */ + position(callback: (x: number, y: number) => void): void; + + /** Move the cursor position by the relative coordinates `x`, `y`. */ + move(x: number, y: number): this; + + /** Move the cursor up by `y` rows. */ + up(y: number): this; + + /** Move the cursor down by `y` rows. */ + down(y: number): this; + + /** Move the cursor left by `x` columns. */ + left(x: number): this; + + /** Move the cursor right by `x` columns. */ + right(x: number): this; + + /** Push the cursor state and optionally the attribute state. */ + push(withAttributes?: boolean): this; + + /** Pop the cursor state and optionally the attribute state. */ + pop(withAttributes?: boolean): this; + + /** + * Erase a region defined by the string `s`. + * + * `s` can be: + * + * - end - erase from the cursor to the end of the line + * - start - erase from the cursor to the start of the line + * - line - erase the current line + * - down - erase everything below the current line + * - up - erase everything above the current line + * - screen - erase the entire screen + */ + erase(s: "end"|"start"|"line"|"down"|"up"|"screen"): this; + + /** + * Delete `'line'` or `'char'`s. delete differs from erase because it does not write over + * the deleted characters with whitesapce, but instead removes the deleted space. + * + * mode can be `'line'` or `'char'`. `n` is the number of items to be deleted. + * `n` must be a positive integer. + * + * The cursor position is not updated. + */ + delete(mode: "line"|"char", n?: number): this; + + /** + * Insert space into the terminal. `insert` is the opposite of `delete`, + * + * mode can be `'line'` or `'char'`. `n` is the number of items to be deleted. + * `n` must be a positive integer. + */ + insert(mode: "line"|"char", n: number): this; + /** + * Set the display mode with the string `attr.` + * + * `attr` can be: + * + * - reset + * - bright + * - dim + * - underscore + * - blink + * - reverse + * - hidden + */ + display(attr: "reset" | "bright" | "dim" | "underscore" | "blink" | "reverse" | "hidden"): this; + + /** + * Set the foreground color with the string `color`, which can be: + * + * - red + * - yellow + * - green + * - blue + * - cyan + * - magenta + * - black + * - white + * - or `color` can be an integer from 0 to 255, inclusive. + */ + foreground(color: CharmColor): this; + /** + * Set the background color with the string `color`, which can be: + * + * - red + * - yellow + * - green + * - blue + * - cyan + * - magenta + * - black + * - white + * - or `color` can be an integer from 0 to 255, inclusive. + */ + background(color: CharmColor): this; + + /** Set the cursor visibility with a boolean `visible`. */ + cursor(visible: boolean): any; + + /** Pipes the output of Charm to a writeable stream `stream` */ + pipe(stream: NodeJS.WritableStream): void; + } +} + +/** + * Create a new readable/writable charm stream. + * + * You can pass in readable or writable streams as parameters + * and they will be piped to or from accordingly. + * You can also pass `process` in which case + * `process.stdin` and `process.stdout` will be used. + */ +declare function charm(param?: charm.CharmAnyStream): charm.CharmInstance; +export = charm; diff --git a/charm/tsconfig.json b/charm/tsconfig.json new file mode 100644 index 0000000000..931b421062 --- /dev/null +++ b/charm/tsconfig.json @@ -0,0 +1,20 @@ +{ + "compilerOptions": { + "module": "commonjs", + "target": "es6", + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "charm-tests.ts" + ] +} diff --git a/charm/tslint.json b/charm/tslint.json new file mode 100644 index 0000000000..f05741c59b --- /dev/null +++ b/charm/tslint.json @@ -0,0 +1,6 @@ +{ + "extends": "../tslint.json", + "rules": { + "forbidden-types": false + } +} From 4d1c1d396e7d6ce3268e0fb5d9aacea654cbe4eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carsten=20Blu=CC=88m?= Date: Mon, 9 Jan 2017 08:16:02 +0100 Subject: [PATCH 010/100] DragulaOptions.copy can be a function --- dragula/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dragula/index.d.ts b/dragula/index.d.ts index 98ff1f3108..fe09c409e2 100644 --- a/dragula/index.d.ts +++ b/dragula/index.d.ts @@ -16,7 +16,7 @@ declare namespace dragula { accepts?: (el?: Element, target?: Element, source?: Element, sibling?: Element) => boolean; invalid?: (el?: Element, target?: Element) => boolean; direction?: string; - copy?: boolean; + copy?: ((el: Element, source: Element) => boolean) | boolean; revertOnSpill?: boolean; removeOnSpill?: boolean; delay?: boolean | number; From c0d65d4b72432f755cfd5a08426abe3b59ffc30a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Snorre=20Magnus=20Dav=C3=B8en?= Date: Mon, 9 Jan 2017 10:56:16 +0100 Subject: [PATCH 011/100] mongoose: Change MongooseDocument.set return type Fix: Change MongooseDocument.set() return type from void to this. See http://mongoosejs.com/docs/api.html#document_Document-set Modify doc.set() examples in test file to chain the set method in order to test the "this" return type. --- mongoose/index.d.ts | 6 +++--- mongoose/mongoose-tests.ts | 7 ++----- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/mongoose/index.d.ts b/mongoose/index.d.ts index 92655b871d..56ad48e617 100644 --- a/mongoose/index.d.ts +++ b/mongoose/index.d.ts @@ -1010,9 +1010,9 @@ declare module "mongoose" { * @param type optionally specify a type for "on-the-fly" attributes * @param options optionally specify options that modify the behavior of the set */ - set(path: string, val: any, options?: Object): void; - set(path: string, val: any, type: any, options?: Object): void; - set(value: Object): void; + set(path: string, val: any, options?: Object): this; + set(path: string, val: any, type: any, options?: Object): this; + set(value: Object): this; /** * The return value of this method is used in calls to JSON.stringify(doc). diff --git a/mongoose/mongoose-tests.ts b/mongoose/mongoose-tests.ts index be63241296..c6dfe20fdc 100644 --- a/mongoose/mongoose-tests.ts +++ b/mongoose/mongoose-tests.ts @@ -449,10 +449,7 @@ doc.populate(function (err, doc) { }); }); doc.populated('path'); -doc.set('path', 999, {}); -doc.set({ - path: 999 -}); +doc.set('path', 999, {}).set({ path: 999 }); doc.toJSON({ getters: true, virtuals: false @@ -1494,4 +1491,4 @@ const extended: mongoose.Model = base.discriminator('extende const x = new extended({ username: 'hi', // required in baseSchema email: 'beddiw', // required in extededSchema -}); \ No newline at end of file +}); From 63322c7d435f6ce215134954920d2509cb8ccfdb Mon Sep 17 00:00:00 2001 From: Rafael Kr Date: Mon, 9 Jan 2017 15:13:14 +0100 Subject: [PATCH 012/100] [bcryptjs] update definitions for v2.4.0 (#13846) * [bcryptjs] update definitions for v2.4.0 * [bcryptjs] update PR based on feedback * [bcryptjs] update PR based on feedback --- bcryptjs/bcryptjs-tests.ts | 13 +++++++++++++ bcryptjs/index.d.ts | 32 ++++++++++++++++++++++++++++---- 2 files changed, 41 insertions(+), 4 deletions(-) diff --git a/bcryptjs/bcryptjs-tests.ts b/bcryptjs/bcryptjs-tests.ts index 83b67c17cc..cd91eb4896 100644 --- a/bcryptjs/bcryptjs-tests.ts +++ b/bcryptjs/bcryptjs-tests.ts @@ -3,6 +3,7 @@ import bcryptjs = require("bcryptjs"); let str: string; let num: number; let bool: boolean; +let error: Error; str = bcryptjs.genSaltSync(); str = bcryptjs.genSaltSync(10); @@ -13,6 +14,12 @@ bcryptjs.genSalt((err: Error, salt: string) => { bcryptjs.genSalt(10, (err: Error, salt: string) => { str = salt; }); +bcryptjs.genSalt() + .then(salt => str = salt) + .catch(err => error = err); +bcryptjs.genSalt(10) + .then(salt => str = salt) + .catch(err => error = err); str = bcryptjs.hashSync("string"); str = bcryptjs.hashSync("string", 10); @@ -26,6 +33,9 @@ bcryptjs.hash("string", 10, (err: Error, hash: string) => { }, (percent: number) => { num = percent; }); +bcryptjs.hash("string", 10) + .then(salt => str = salt) + .catch(err => error = err); bcryptjs.hash("string", "salt", (err: Error, hash: string) => { str = hash; @@ -46,6 +56,9 @@ bcryptjs.compare("string1", "string2", (err: Error, success: boolean) => { }, (percent: number) => { num = percent; }); +bcryptjs.compare("string1", "string2") + .then(success => bool = success) + .catch(err => error = err); num = bcryptjs.getRounds("string"); diff --git a/bcryptjs/index.d.ts b/bcryptjs/index.d.ts index fd1c0d7903..c081ed33fd 100644 --- a/bcryptjs/index.d.ts +++ b/bcryptjs/index.d.ts @@ -1,6 +1,6 @@ -// Type definitions for bcryptjs v2.3.0 +// Type definitions for bcryptjs v2.4.0 // Project: https://github.com/dcodeIO/bcrypt.js -// Definitions by: Joshua Filby +// Definitions by: Joshua Filby , Rafael Kraut // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped @@ -16,9 +16,17 @@ export declare function setRandomFallback(random: (random: number) => number[]): * Synchronously generates a salt. * @param rounds Number of rounds to use, defaults to 10 if omitted * @return Resulting salt + * @throws If a random fallback is required but not set */ export declare function genSaltSync(rounds?: number): string; +/** + * Asynchronously generates a salt. + * @param rounds Number of rounds to use, defaults to 10 if omitted + * @return Promise with resulting salt, if callback has been omitted + */ +export declare function genSalt(rounds?: number): Promise; + /** * Asynchronously generates a salt. * @param callback Callback receiving the error, if any, and the resulting salt @@ -40,6 +48,14 @@ export declare function genSalt(rounds: number, callback: (err: Error, salt: str */ export declare function hashSync(s: string, salt?: number | string): string; +/** + * Asynchronously generates a hash for the given string. + * @param s String to hash + * @param salt Salt length to generate or salt to use + * @return Promise with resulting hash, if callback has been omitted + */ +export declare function hash(s: string, salt: number | string): Promise; + /** * Asynchronously generates a hash for the given string. * @param s String to hash @@ -47,7 +63,7 @@ export declare function hashSync(s: string, salt?: number | string): string; * @param callback Callback receiving the error, if any, and the resulting hash * @param progressCallback Callback successively called with the percentage of rounds completed (0.0 - 1.0), maximally once per MAX_EXECUTION_TIME = 100 ms. */ -export declare function hash(s: string, salt: number | string, callback: (err: Error, hash: string) => void, progressCallback?: (percent: number) => void): void; +export declare function hash(s: string, salt: number | string, callback?: (err: Error, hash: string) => void, progressCallback?: (percent: number) => void): void; /** * Synchronously tests a string against a hash. @@ -57,6 +73,14 @@ export declare function hash(s: string, salt: number | string, callback: (err: E */ export declare function compareSync(s: string, hash: string): boolean; +/** + * Asynchronously compares the given data against the given hash. + * @param s Data to compare + * @param hash Data to be compared to + * @return Promise, if callback has been omitted + */ +export declare function compare(s: string, hash: string): Promise; + /** * Asynchronously compares the given data against the given hash. * @param s Data to compare @@ -64,7 +88,7 @@ export declare function compareSync(s: string, hash: string): boolean; * @param callback Callback receiving the error, if any, otherwise the result * @param progressCallback Callback successively called with the percentage of rounds completed (0.0 - 1.0), maximally once per MAX_EXECUTION_TIME = 100 ms. */ -export declare function compare(s: string, hash: string, callback: (err: Error, success: boolean) => void, progressCallback?: (percent: number) => void): void; +export declare function compare(s: string, hash: string, callback?: (err: Error, success: boolean) => void, progressCallback?: (percent: number) => void): void; /** * Gets the number of rounds used to encrypt the specified hash. From d3ae5ced6d5876fa65999a62f1566ac9f6958889 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carsten=20Bl=C3=BCm?= Date: Mon, 9 Jan 2017 15:14:06 +0100 Subject: [PATCH 013/100] Dragula: DragulaOptions.copy can also be a function (#13761) * DragulaOptions.copy can be a function In addition to boolean, a callback function is supported. See https://github.com/bevacqua/dragula#optionscopy * Fix missing types --- dragula/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dragula/index.d.ts b/dragula/index.d.ts index 98ff1f3108..fe09c409e2 100644 --- a/dragula/index.d.ts +++ b/dragula/index.d.ts @@ -16,7 +16,7 @@ declare namespace dragula { accepts?: (el?: Element, target?: Element, source?: Element, sibling?: Element) => boolean; invalid?: (el?: Element, target?: Element) => boolean; direction?: string; - copy?: boolean; + copy?: ((el: Element, source: Element) => boolean) | boolean; revertOnSpill?: boolean; removeOnSpill?: boolean; delay?: boolean | number; From 8d3b3fbdc489c764d2e98fa5f633be8cc7ea387a Mon Sep 17 00:00:00 2001 From: Joey Marianer Date: Mon, 9 Jan 2017 07:11:57 -0800 Subject: [PATCH 014/100] Add definitions for concat-stream (#13851) --- concat-stream/concat-stream-tests.ts | 20 ++++++++++++++++++++ concat-stream/index.d.ts | 17 +++++++++++++++++ concat-stream/tsconfig.json | 20 ++++++++++++++++++++ concat-stream/tslint.json | 1 + 4 files changed, 58 insertions(+) create mode 100644 concat-stream/concat-stream-tests.ts create mode 100644 concat-stream/index.d.ts create mode 100644 concat-stream/tsconfig.json create mode 100644 concat-stream/tslint.json diff --git a/concat-stream/concat-stream-tests.ts b/concat-stream/concat-stream-tests.ts new file mode 100644 index 0000000000..6dac3129f0 --- /dev/null +++ b/concat-stream/concat-stream-tests.ts @@ -0,0 +1,20 @@ +import concat = require("concat-stream") + +import { Readable } from "stream"; + +class MyReadable extends Readable { + i: number = 1; + _read() { + if (this.i <= 100) { + this.push(this.i.toString()); + this.i++; + } else { + this.push(null); + } + } +} + +let myReadable = new MyReadable(); + +myReadable.pipe(concat((buf) => console.log(buf.toString()))); +myReadable.pipe(concat({}, (buf) => console.log(buf.toString()))); diff --git a/concat-stream/index.d.ts b/concat-stream/index.d.ts new file mode 100644 index 0000000000..578a3e48b8 --- /dev/null +++ b/concat-stream/index.d.ts @@ -0,0 +1,17 @@ +// Type definitions for concat-stream 1.6 +// Project: https://github.com/maxogden/concat-stream +// Definitions by: Joey Marianer +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/// + +import { Writable } from "stream"; + +interface ConcatOpts { + encoding?: string; +} + +declare function concat(cb: (buf: Buffer) => void): Writable; +declare function concat(opts: ConcatOpts, cb: (buf: Buffer) => void): Writable; + +export = concat; diff --git a/concat-stream/tsconfig.json b/concat-stream/tsconfig.json new file mode 100644 index 0000000000..3e6c0e2260 --- /dev/null +++ b/concat-stream/tsconfig.json @@ -0,0 +1,20 @@ +{ + "compilerOptions": { + "module": "commonjs", + "target": "es6", + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "concat-stream-tests.ts" + ] +} diff --git a/concat-stream/tslint.json b/concat-stream/tslint.json new file mode 100644 index 0000000000..377cc837d4 --- /dev/null +++ b/concat-stream/tslint.json @@ -0,0 +1 @@ +{ "extends": "../tslint.json" } From 52f15e0fca62b37986aaca2a58a5e6e3dea15001 Mon Sep 17 00:00:00 2001 From: Goldsmith42 Date: Mon, 9 Jan 2017 17:59:12 +0100 Subject: [PATCH 015/100] Definitions for duplexer2 (#13860) * Added definition for async-polling * async-polling tests with noImplicitAny * Definitions for xsd-schema-validator * Definitions for duplexer2. * Added noImplicitThis: true --- duplexer2/duplexer2-tests.ts | 33 ++++++++++++++++++++++++++++++ duplexer2/index.d.ts | 13 ++++++++++++ duplexer2/tsconfig.json | 20 ++++++++++++++++++ duplexer2/tslint.json | 1 + xsd-schema-validator/index.d.ts | 2 +- xsd-schema-validator/tsconfig.json | 2 +- 6 files changed, 69 insertions(+), 2 deletions(-) create mode 100644 duplexer2/duplexer2-tests.ts create mode 100644 duplexer2/index.d.ts create mode 100644 duplexer2/tsconfig.json create mode 100644 duplexer2/tslint.json diff --git a/duplexer2/duplexer2-tests.ts b/duplexer2/duplexer2-tests.ts new file mode 100644 index 0000000000..d611b69144 --- /dev/null +++ b/duplexer2/duplexer2-tests.ts @@ -0,0 +1,33 @@ +import stream = require("stream"); +import duplexer2 = require("duplexer2"); + +let writable = new stream.Writable({ objectMode: true }), + readable = new stream.Readable({ objectMode: true }); + +writable.once("finish", () => { + setTimeout(() => { + readable.push(null); + }, 500); +}); + +let duplex = duplexer2(writable, readable); + +duplex.on("data", (e: any) => { + console.log("got data", JSON.stringify(e)); +}); + +duplex.on("finish", () => { + console.log("got finish event"); +}); + +duplex.on("end", () => { + console.log("got end event"); +}); + +duplex.write("oh, hi there", () => { + console.log("finished writing"); +}); + +duplex.end("", () => { + console.log("finished ending"); +}); \ No newline at end of file diff --git a/duplexer2/index.d.ts b/duplexer2/index.d.ts new file mode 100644 index 0000000000..a8b5e4c3a8 --- /dev/null +++ b/duplexer2/index.d.ts @@ -0,0 +1,13 @@ +// Type definitions for duplexer2 0.1 +// Project: https://github.com/deoxxa/duplexer2 +// Definitions by: Zlatko Andonovski +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +// Definition file started by dts-gen + +/// + +declare function duplexer2(options: {bubbleErrors: boolean}, writable: NodeJS.WritableStream, readable: NodeJS.ReadableStream): NodeJS.ReadWriteStream; +declare function duplexer2(writable: NodeJS.WritableStream, readable: NodeJS.ReadableStream): NodeJS.ReadWriteStream; + +export = duplexer2; diff --git a/duplexer2/tsconfig.json b/duplexer2/tsconfig.json new file mode 100644 index 0000000000..61d21210f6 --- /dev/null +++ b/duplexer2/tsconfig.json @@ -0,0 +1,20 @@ +{ + "files": [ + "index.d.ts", + "duplexer2-tests.ts" + ], + "compilerOptions": { + "module": "commonjs", + "target": "es6", + "noImplicitAny": true, + "strictNullChecks": false, + "noImplicitThis": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + } +} \ No newline at end of file diff --git a/duplexer2/tslint.json b/duplexer2/tslint.json new file mode 100644 index 0000000000..377cc837d4 --- /dev/null +++ b/duplexer2/tslint.json @@ -0,0 +1 @@ +{ "extends": "../tslint.json" } diff --git a/xsd-schema-validator/index.d.ts b/xsd-schema-validator/index.d.ts index c4fd02e8f5..db867b4178 100644 --- a/xsd-schema-validator/index.d.ts +++ b/xsd-schema-validator/index.d.ts @@ -9,4 +9,4 @@ export function validateXML(xml: string|NodeJS.ReadableStream|{file: string}, pa valid: boolean; messages: string[]; result: string; -}) => void): void; +}) => void): void; \ No newline at end of file diff --git a/xsd-schema-validator/tsconfig.json b/xsd-schema-validator/tsconfig.json index f41083f666..e720897bf8 100644 --- a/xsd-schema-validator/tsconfig.json +++ b/xsd-schema-validator/tsconfig.json @@ -17,4 +17,4 @@ "index.d.ts", "xsd-schema-validator-tests.ts" ] -} \ No newline at end of file +} From bd1bbf1d1549351c619769f6de72fd050fa2a8ee Mon Sep 17 00:00:00 2001 From: "Smith, Blake (bs557j)" Date: Mon, 9 Jan 2017 11:16:07 -0600 Subject: [PATCH 016/100] id is not required when creating a document. If it's not specified, ES will generate a unique ID for the document. --- elasticsearch/elasticsearch-tests.ts | 5 +++++ elasticsearch/index.d.ts | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/elasticsearch/elasticsearch-tests.ts b/elasticsearch/elasticsearch-tests.ts index c9be3c01ef..98d5a6c925 100644 --- a/elasticsearch/elasticsearch-tests.ts +++ b/elasticsearch/elasticsearch-tests.ts @@ -32,6 +32,11 @@ client.indices.delete({ }, function (error) { }); +client.create({ + index: 'index', + type: 'type' +}); + client.create({ id: '123', index: 'index', diff --git a/elasticsearch/index.d.ts b/elasticsearch/index.d.ts index f3ac0992c6..6558c94f2f 100644 --- a/elasticsearch/index.d.ts +++ b/elasticsearch/index.d.ts @@ -195,7 +195,7 @@ declare module Elasticsearch { version?: number; versionType?: VersionType; pipeline?: string; - id: string; + id?: string; index: string; type: string; } From 8f1c02df74e77390b6d9ef70ce218f0efda6abd2 Mon Sep 17 00:00:00 2001 From: JD-Robbs Date: Mon, 9 Jan 2017 17:49:41 +0000 Subject: [PATCH 017/100] Adds SHA1 definition --- sha1/index.d.ts | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 sha1/index.d.ts diff --git a/sha1/index.d.ts b/sha1/index.d.ts new file mode 100644 index 0000000000..3fbc990b23 --- /dev/null +++ b/sha1/index.d.ts @@ -0,0 +1,15 @@ +// Type definitions for sha1 v1.1.1 +// Project: https://github.com/pvorb/node-sha1 +// Definitions adapted from md5 definitions by: Bill Sourour +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/// + +/** + * js function for hashing messages with SHA1 + * + * @param {(string | Buffer)} message - a string or buffer to hash + * @returns {string} the resultant SHA1 hash of the given message + */ +declare function main(message: string | Buffer): string; +export = main; From 454c0750358973b4e5fb685f17238c5b76c459d8 Mon Sep 17 00:00:00 2001 From: JD-Robbs Date: Mon, 9 Jan 2017 17:58:46 +0000 Subject: [PATCH 018/100] Adds initial test --- sha/sha1-tests.ts | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 sha/sha1-tests.ts diff --git a/sha/sha1-tests.ts b/sha/sha1-tests.ts new file mode 100644 index 0000000000..4952edb6c9 --- /dev/null +++ b/sha/sha1-tests.ts @@ -0,0 +1,33 @@ +/// + +import fs = require("fs"); +import sha1 = require("sha1"); +/** + * API + * md5(message) + * message -- String or Buffer + * returns String + * + * Usage + **************************************************** + * var sha1 = require('sha1'); * + * console.log(sha1('message')); * + **************************************************** + * This will print the following + * 6f9b9af3cd6e8b8a73c2cdced37fe9f59226e27d + * + * It supports buffers, too + **************************************************** + * var fs = require('fs'); * + * var sha1 = require('sha1'); * + * * + * fs.readFile('example.txt', function(err, buf) { * + * console.log(sha1(buf)); * + * }); * + * ************************************************** + */ +console.log(sha1('message')); // should print 6f9b9af3cd6e8b8a73c2cdced37fe9f59226e27d + +fs.readFile('sha1.d.ts', function(err: Error, buf: Buffer) { + console.log(sha1(buf)); +}); From 5b76a5ecfbdcc0a82e7ec91ef181e26058279018 Mon Sep 17 00:00:00 2001 From: JD-Robbs Date: Mon, 9 Jan 2017 17:59:25 +0000 Subject: [PATCH 019/100] Adds tsconfig.json --- sha/tsconfig.json | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 sha/tsconfig.json diff --git a/sha/tsconfig.json b/sha/tsconfig.json new file mode 100644 index 0000000000..81a2585b1f --- /dev/null +++ b/sha/tsconfig.json @@ -0,0 +1,19 @@ +{ + "compilerOptions": { + "module": "commonjs", + "target": "es6", + "noImplicitAny": true, + "strictNullChecks": false, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "sha1-tests.ts" + ] +} From 32c313fcde5335a496670e78e1e91915450eff49 Mon Sep 17 00:00:00 2001 From: Bert Verhelst Date: Mon, 9 Jan 2017 19:01:02 +0100 Subject: [PATCH 020/100] Add missing meanBy function to LodashStatic (#13862) This should resolve the issue: https://github.com/DefinitelyTyped/DefinitelyTyped/issues/13861 --- lodash/index.d.ts | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/lodash/index.d.ts b/lodash/index.d.ts index 731cf801ca..89436684c1 100644 --- a/lodash/index.d.ts +++ b/lodash/index.d.ts @@ -13288,6 +13288,28 @@ declare namespace _ { ): number; } + //_.meanBy + interface LoDashStatic { + /** + * Computes the mean of the provided propties of the objects in the `array` + * + * @static + * @memberOf _ + * @category Math + * @param {Array} array The array to iterate over. + * @param {Function|Object|string} [iteratee=_.identity] The iteratee invoked per element. + * @returns {number} Returns the mean. + * @example + * + * _.mean([{ 'n': 4 }, { 'n': 2 }, { 'n': 8 }, { 'n': 6 }], 'n'); + * // => 5 + */ + meanBy( + collection: List, + iteratee?: DictionaryIterator + ): number; + } + interface LoDashImplicitArrayWrapper { /** * @see _.mean From 4547b99203ddde063a5d51675116e4babb8d4020 Mon Sep 17 00:00:00 2001 From: JD-Robbs Date: Mon, 9 Jan 2017 18:01:09 +0000 Subject: [PATCH 021/100] Move file --- {sha => sha1}/sha1-tests.ts | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {sha => sha1}/sha1-tests.ts (100%) diff --git a/sha/sha1-tests.ts b/sha1/sha1-tests.ts similarity index 100% rename from sha/sha1-tests.ts rename to sha1/sha1-tests.ts From ff966529061ea2b0cdb9f94aaf0a87d1887bb2f3 Mon Sep 17 00:00:00 2001 From: JD-Robbs Date: Mon, 9 Jan 2017 18:01:31 +0000 Subject: [PATCH 022/100] Move file --- {sha => sha1}/tsconfig.json | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {sha => sha1}/tsconfig.json (100%) diff --git a/sha/tsconfig.json b/sha1/tsconfig.json similarity index 100% rename from sha/tsconfig.json rename to sha1/tsconfig.json From e28099962b7b64963e5bf11487f2408c2ac67055 Mon Sep 17 00:00:00 2001 From: JD-Robbs Date: Mon, 9 Jan 2017 18:06:22 +0000 Subject: [PATCH 023/100] Extend typings --- sha1/index.d.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/sha1/index.d.ts b/sha1/index.d.ts index 3fbc990b23..58d931b26e 100644 --- a/sha1/index.d.ts +++ b/sha1/index.d.ts @@ -11,5 +11,10 @@ * @param {(string | Buffer)} message - a string or buffer to hash * @returns {string} the resultant SHA1 hash of the given message */ -declare function main(message: string | Buffer): string; +declare function main(message: string | Buffer, options?: Sha1Options): string | Uint8Array; export = main; + +interface Sha1Options { + asBytes?: boolean; + asString?: boolean; +} From 5e054896cd59a926b83108585a84e89e78991511 Mon Sep 17 00:00:00 2001 From: JD-Robbs Date: Mon, 9 Jan 2017 18:10:44 +0000 Subject: [PATCH 024/100] Add additional tests --- sha1/sha1-tests.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sha1/sha1-tests.ts b/sha1/sha1-tests.ts index 4952edb6c9..0bce4c855d 100644 --- a/sha1/sha1-tests.ts +++ b/sha1/sha1-tests.ts @@ -4,7 +4,7 @@ import fs = require("fs"); import sha1 = require("sha1"); /** * API - * md5(message) + * sha1(message) * message -- String or Buffer * returns String * @@ -28,6 +28,9 @@ import sha1 = require("sha1"); */ console.log(sha1('message')); // should print 6f9b9af3cd6e8b8a73c2cdced37fe9f59226e27d +const testTwo = sha1('message', {asString: true}); +const testThree = sha1('message', {asBytes: true}); + fs.readFile('sha1.d.ts', function(err: Error, buf: Buffer) { console.log(sha1(buf)); }); From 58af9b88072d48c222286b78812949b494e1f676 Mon Sep 17 00:00:00 2001 From: JD-Robbs Date: Mon, 9 Jan 2017 18:15:03 +0000 Subject: [PATCH 025/100] Update sha1-tests.ts --- sha1/sha1-tests.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/sha1/sha1-tests.ts b/sha1/sha1-tests.ts index 0bce4c855d..f2c6547f2b 100644 --- a/sha1/sha1-tests.ts +++ b/sha1/sha1-tests.ts @@ -7,7 +7,7 @@ import sha1 = require("sha1"); * sha1(message) * message -- String or Buffer * returns String - * + * * Usage **************************************************** * var sha1 = require('sha1'); * @@ -15,10 +15,10 @@ import sha1 = require("sha1"); **************************************************** * This will print the following * 6f9b9af3cd6e8b8a73c2cdced37fe9f59226e27d - * + * * It supports buffers, too - **************************************************** - * var fs = require('fs'); * + **************************************************** + * var fs = require('fs'); * * var sha1 = require('sha1'); * * * * fs.readFile('example.txt', function(err, buf) { * @@ -32,5 +32,5 @@ const testTwo = sha1('message', {asString: true}); const testThree = sha1('message', {asBytes: true}); fs.readFile('sha1.d.ts', function(err: Error, buf: Buffer) { - console.log(sha1(buf)); + console.log(sha1(buf)); }); From fea8a860b081b57040a9864fbc0938c21a4c050e Mon Sep 17 00:00:00 2001 From: JD-Robbs Date: Mon, 9 Jan 2017 18:15:35 +0000 Subject: [PATCH 026/100] Edits JSDoc --- sha1/index.d.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/sha1/index.d.ts b/sha1/index.d.ts index 58d931b26e..0e35adf8dd 100644 --- a/sha1/index.d.ts +++ b/sha1/index.d.ts @@ -7,14 +7,15 @@ /** * js function for hashing messages with SHA1 - * + * * @param {(string | Buffer)} message - a string or buffer to hash + * @param {Sha1Options} options - an options object * @returns {string} the resultant SHA1 hash of the given message */ declare function main(message: string | Buffer, options?: Sha1Options): string | Uint8Array; export = main; interface Sha1Options { - asBytes?: boolean; - asString?: boolean; + asBytes?: boolean; + asString?: boolean; } From f579b14ff52056f8d258ded22aaadc3eeba71a41 Mon Sep 17 00:00:00 2001 From: JD-Robbs Date: Mon, 9 Jan 2017 18:23:47 +0000 Subject: [PATCH 027/100] Update index.d.ts --- sha1/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sha1/index.d.ts b/sha1/index.d.ts index 0e35adf8dd..c792f7d585 100644 --- a/sha1/index.d.ts +++ b/sha1/index.d.ts @@ -1,6 +1,6 @@ // Type definitions for sha1 v1.1.1 // Project: https://github.com/pvorb/node-sha1 -// Definitions adapted from md5 definitions by: Bill Sourour +// Definitions by: Bill Sourour // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped /// From 22e1bd7305fa9d76424e19b6cc62bbd54bc3d84a Mon Sep 17 00:00:00 2001 From: JD-Robbs Date: Mon, 9 Jan 2017 18:35:00 +0000 Subject: [PATCH 028/100] Update tsconfig.json --- sha1/tsconfig.json | 1 + 1 file changed, 1 insertion(+) diff --git a/sha1/tsconfig.json b/sha1/tsconfig.json index 81a2585b1f..ec99de7c10 100644 --- a/sha1/tsconfig.json +++ b/sha1/tsconfig.json @@ -3,6 +3,7 @@ "module": "commonjs", "target": "es6", "noImplicitAny": true, + "noImplicitThis": true, "strictNullChecks": false, "baseUrl": "../", "typeRoots": [ From 4e4033684590f48bb93897cffa9e258596aa1f6f Mon Sep 17 00:00:00 2001 From: Steve Ognibene Date: Mon, 9 Jan 2017 13:36:08 -0500 Subject: [PATCH 029/100] Remove const enum label from node (now works with --isolatedModules) --- node/index.d.ts | 2 +- node/tsconfig.json | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/node/index.d.ts b/node/index.d.ts index ba3a7685fc..ba2bbed3d6 100644 --- a/node/index.d.ts +++ b/node/index.d.ts @@ -3958,7 +3958,7 @@ declare module "v8" { physical_space_size: number; } - const enum DoesZapCodeSpaceFlag { + enum DoesZapCodeSpaceFlag { Disabled = 0, Enabled = 1 } diff --git a/node/tsconfig.json b/node/tsconfig.json index adc8804da6..15c5691724 100644 --- a/node/tsconfig.json +++ b/node/tsconfig.json @@ -15,6 +15,7 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "isolatedModules": true } } \ No newline at end of file From c77960897db7902e98b9ab49f16d23d369d58b75 Mon Sep 17 00:00:00 2001 From: Risto Keravuori Date: Mon, 9 Jan 2017 11:16:22 -0800 Subject: [PATCH 030/100] Update types for fetch-mock v5.8.1 (#13784) --- fetch-mock/fetch-mock-tests.ts | 46 +++++-- fetch-mock/index.d.ts | 221 +++++++++++++++++++++++++-------- fetch-mock/tslint.json | 1 + 3 files changed, 206 insertions(+), 62 deletions(-) create mode 100644 fetch-mock/tslint.json diff --git a/fetch-mock/fetch-mock-tests.ts b/fetch-mock/fetch-mock-tests.ts index 2f0080ebac..f16aab11c9 100644 --- a/fetch-mock/fetch-mock-tests.ts +++ b/fetch-mock/fetch-mock-tests.ts @@ -4,12 +4,13 @@ fetchMock.mock("http://test.com", 200); fetchMock.mock(/test\.com/, 200); fetchMock.mock(() => true, 200); fetchMock.mock((url, opts) => true, 200); +fetchMock.once("http://test.com", 200); fetchMock.mock(/test/, "test").mock(/test/, { a: "b" }); fetchMock.mock(/test/, { status: 200, headers: { - "test": "test" + test: "test" }, body: { a: "b" @@ -23,20 +24,39 @@ fetchMock.calls().unmatched[0][0].toUpperCase(); fetchMock.calls("http://test.com")[0][0].toUpperCase(); (fetchMock.calls("http://test.com")[0][1] as RequestInit).body; -fetchMock.called("http://test.com"); +let doneStatus: boolean = fetchMock.done(); +let doneStatusArguments: boolean = fetchMock.done("http://test.com"); + +let calledStatus: boolean = fetchMock.called(); +let calledStatusArguments = fetchMock.called("http://test.com"); (fetchMock.lastCall()[1] as RequestInit).body; -fetchMock.lastUrl(); +let lastUrl: string = fetchMock.lastUrl(); fetchMock.lastOptions(); -fetchMock.get("http://test.com", 200) -fetchMock.post("http://test.com", 200) -fetchMock.put("http://test.com", 200) -fetchMock.delete("http://test.com", 200) -fetchMock.head("http://test.com", 200) +fetchMock.get("http://test.com", 200); +fetchMock.getOnce("http://test.com", 200); +fetchMock.post("http://test.com", 200); +fetchMock.postOnce("http://test.com", 200); +fetchMock.put("http://test.com", 200); +fetchMock.putOnce("http://test.com", 200); +fetchMock.delete("http://test.com", 200); +fetchMock.deleteOnce("http://test.com", 200); +fetchMock.head("http://test.com", 200); +fetchMock.headOnce("http://test.com", 200); +fetchMock.patch("http://test.com", 200); +fetchMock.patchOnce("http://test.com", 200); -fetchMock.get("http://test.com", 200, {method: "GET"}) -fetchMock.post("http://test.com", 200, {method: "POST"}) -fetchMock.put("http://test.com", 200, {method: "PUT"}) -fetchMock.delete("http://test.com", 200, {method: "DELETE"}) -fetchMock.head("http://test.com", 200, {method: "HEAD"}) +fetchMock.get("http://test.com", 200, {method: "GET"}); +fetchMock.post("http://test.com", 200, {method: "POST"}); +fetchMock.put("http://test.com", 200, {method: "PUT"}); +fetchMock.delete("http://test.com", 200, {method: "DELETE"}); +fetchMock.head("http://test.com", 200, {method: "HEAD"}); + +fetchMock + .mock("http://test.com", 200) + .catch(503); + +fetchMock + .mock("http://test.com", 200) + .spy(); diff --git a/fetch-mock/index.d.ts b/fetch-mock/index.d.ts index cda0b2539f..4d69096845 100644 --- a/fetch-mock/index.d.ts +++ b/fetch-mock/index.d.ts @@ -1,6 +1,6 @@ -// Type definitions for fetch-mock 5.0.0 +// Type definitions for fetch-mock 5.8 // Project: https://github.com/wheresrhys/fetch-mock -// Definitions by: Alexey Svetliakov , Tamir Duberstein +// Definitions by: Alexey Svetliakov , Tamir Duberstein , Risto Keravuori // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped /// @@ -11,7 +11,7 @@ type MockRequest = Request | RequestInit; * @param url * @param opts */ -type MockMatcherFunction = (url: string, opts: MockRequest) => boolean +type MockMatcherFunction = (url: string, opts: MockRequest) => boolean; /** * Mock matcher. Can be one of following: * string: Either @@ -69,7 +69,7 @@ interface MockResponseObject { type MockResponse = Response | Promise | number | Promise | string | Promise - | Object | Promise + | {} | Promise<{}> | MockResponseObject | Promise; /** * Mock response function @@ -104,33 +104,41 @@ interface MockOptions { * as specified above */ response?: MockResponse | MockResponseFunction; + /** + * integer, n, limiting the number of times the matcher can be used. + If the route has already been called n times the route will be + ignored and the call to fetch() will fall through to be handled by + any other routes defined (which may eventually result in an error + if nothing matches it). + */ + times?: number; } type MockCall = [string, MockRequest]; interface MatchedRoutes { - matched: Array; - unmatched: Array; + matched: MockCall[]; + unmatched: MockCall[]; } interface MockOptionsMethodGet extends MockOptions { - method: 'GET' + method: 'GET'; } interface MockOptionsMethodPost extends MockOptions { - method: 'POST' + method: 'POST'; } interface MockOptionsMethodPut extends MockOptions { - method: 'PUT' + method: 'PUT'; } interface MockOptionsMethodDelete extends MockOptions { - method: 'DELETE' + method: 'DELETE'; } interface MockOptionsMethodHead extends MockOptions { - method: 'HEAD' + method: 'HEAD'; } interface FetchMockStatic { @@ -140,17 +148,9 @@ interface FetchMockStatic { call through to fetch(). Calls to .mock() can be chained. * @param matcher Condition for selecting which requests to mock * @param response Configures the http response returned by the mock + * @param [options] Additional properties defining the route to mock */ - mock(matcher: MockMatcher, response: MockResponse | MockResponseFunction): this; - /** - * Replaces fetch() with a stub which records its calls, grouped by - route, and optionally returns a mocked Response object or passes the - call through to fetch(). Calls to .mock() can be chained. - * @param matcher Condition for selecting which requests to mock - * @param response Configures the http response returned by the mock - * @param options Additional properties defining the route to mock - */ - mock(matcher: MockMatcher, response: MockResponse | MockResponseFunction, options: MockOptions): this; + mock(matcher: MockMatcher, response: MockResponse | MockResponseFunction, options?: MockOptions): this; /** * Replaces fetch() with a stub which records its calls, grouped by route, and optionally returns a mocked Response object or passes the @@ -158,65 +158,180 @@ interface FetchMockStatic { * @param options The route to mock */ mock(options: MockOptions): this; + + /** + * Replaces fetch() with a stub which records its calls, grouped by + route, and optionally returns a mocked Response object or passes the + call through to fetch(). Shorthand for mock() limited to being + called one time only. Calls to .once() can be chained. + * @param matcher Condition for selecting which requests to mock + * @param response Configures the http response returned by the mock + * @param [options] Optional additional properties defining the route to mock + */ + once(matcher: MockMatcher, response: MockResponse | MockResponseFunction, options?: MockOptions): this; + /** * Replaces fetch() with a stub which records its calls, grouped by route, and optionally returns a mocked Response object or passes the call through to fetch(). Shorthand for mock() restricted to the GET - method. Calls to .mock() can be chained. + method. Calls to .get() can be chained. * @param matcher Condition for selecting which requests to mock * @param response Configures the http response returned by the mock * @param [options] Additional properties defining the route to mock */ get(matcher: MockMatcher, reponse: MockResponse | MockResponseFunction, options?: MockOptionsMethodGet): this; + /** + * Replaces fetch() with a stub which records its calls, grouped by + route, and optionally returns a mocked Response object or passes the + call through to fetch(). Shorthand for mock() restricted to the GET + method and limited to being called one time only. Calls to .getOnce() + can be chained. + * @param matcher Condition for selecting which requests to mock + * @param response Configures the http response returned by the mock + * @param [options] Additional properties defining the route to mock + */ + getOnce(matcher: MockMatcher, reponse: MockResponse | MockResponseFunction, options?: MockOptionsMethodGet): this; + /** * Replaces fetch() with a stub which records its calls, grouped by route, and optionally returns a mocked Response object or passes the call through to fetch(). Shorthand for mock() restricted to the POST - method. Calls to .mock() can be chained. + method. Calls to .post() can be chained. * @param matcher Condition for selecting which requests to mock * @param response Configures the http response returned by the mock * @param [options] Additional properties defining the route to mock */ post(matcher: MockMatcher, reponse: MockResponse | MockResponseFunction, options?: MockOptionsMethodPost): this; + /** + * Replaces fetch() with a stub which records its calls, grouped by + route, and optionally returns a mocked Response object or passes the + call through to fetch(). Shorthand for mock() restricted to the POST + method and limited to being called one time only. Calls to .postOnce() + can be chained. + * @param matcher Condition for selecting which requests to mock + * @param response Configures the http response returned by the mock + * @param [options] Additional properties defining the route to mock + */ + postOnce(matcher: MockMatcher, reponse: MockResponse | MockResponseFunction, options?: MockOptionsMethodPost): this; + /** * Replaces fetch() with a stub which records its calls, grouped by route, and optionally returns a mocked Response object or passes the call through to fetch(). Shorthand for mock() restricted to the PUT - method. Calls to .mock() can be chained. + method. Calls to .put() can be chained. * @param matcher Condition for selecting which requests to mock * @param response Configures the http response returned by the mock * @param [options] Additional properties defining the route to mock */ put(matcher: MockMatcher, reponse: MockResponse | MockResponseFunction, options?: MockOptionsMethodPut): this; + /** + * Replaces fetch() with a stub which records its calls, grouped by + route, and optionally returns a mocked Response object or passes the + call through to fetch(). Shorthand for mock() restricted to the PUT + method and limited to being called one time only. Calls to .putOnce() + can be chained. + * @param matcher Condition for selecting which requests to mock + * @param response Configures the http response returned by the mock + * @param [options] Additional properties defining the route to mock + */ + putOnce(matcher: MockMatcher, reponse: MockResponse | MockResponseFunction, options?: MockOptionsMethodPut): this; + /** * Replaces fetch() with a stub which records its calls, grouped by route, and optionally returns a mocked Response object or passes the call through to fetch(). Shorthand for mock() restricted to the - DELETE method. Calls to .mock() can be chained. + DELETE method. Calls to .delete() can be chained. * @param matcher Condition for selecting which requests to mock * @param response Configures the http response returned by the mock * @param [options] Additional properties defining the route to mock */ delete(matcher: MockMatcher, reponse: MockResponse | MockResponseFunction, options?: MockOptionsMethodDelete): this; + /** + * Replaces fetch() with a stub which records its calls, grouped by + route, and optionally returns a mocked Response object or passes the + call through to fetch(). Shorthand for mock() restricted to the + DELETE method and limited to being called one time only. Calls to + .deleteOnce() can be chained. + * @param matcher Condition for selecting which requests to mock + * @param response Configures the http response returned by the mock + * @param [options] Additional properties defining the route to mock + */ + deleteOnce(matcher: MockMatcher, reponse: MockResponse | MockResponseFunction, options?: MockOptionsMethodDelete): this; + /** * Replaces fetch() with a stub which records its calls, grouped by route, and optionally returns a mocked Response object or passes the call through to fetch(). Shorthand for mock() restricted to the HEAD - method. Calls to .mock() can be chained. + method. Calls to .head() can be chained. * @param matcher Condition for selecting which requests to mock * @param response Configures the http response returned by the mock * @param [options] Additional properties defining the route to mock */ head(matcher: MockMatcher, reponse: MockResponse | MockResponseFunction, options?: MockOptionsMethodHead): this; + /** + * Replaces fetch() with a stub which records its calls, grouped by + route, and optionally returns a mocked Response object or passes the + call through to fetch(). Shorthand for mock() restricted to the HEAD + method and limited to being called one time only. Calls to .headOnce() + can be chained. + * @param matcher Condition for selecting which requests to mock + * @param response Configures the http response returned by the mock + * @param [options] Additional properties defining the route to mock + */ + headOnce(matcher: MockMatcher, reponse: MockResponse | MockResponseFunction, options?: MockOptionsMethodHead): this; + + /** + * Replaces fetch() with a stub which records its calls, grouped by + route, and optionally returns a mocked Response object or passes the + call through to fetch(). Shorthand for mock() restricted to the PATCH + method. Calls to .patch() can be chained. + * @param matcher Condition for selecting which requests to mock + * @param response Configures the http response returned by the mock + * @param [options] Additional properties defining the route to mock + */ + patch(matcher: MockMatcher, reponse: MockResponse | MockResponseFunction, options?: MockOptionsMethodHead): this; + /** + * Replaces fetch() with a stub which records its calls, grouped by + route, and optionally returns a mocked Response object or passes the + call through to fetch(). Shorthand for mock() restricted to the PATCH + method and limited to being called one time only. Calls to .patchOnce() + can be chained. + * @param matcher Condition for selecting which requests to mock + * @param response Configures the http response returned by the mock + * @param [options] Additional properties defining the route to mock + */ + patchOnce(matcher: MockMatcher, reponse: MockResponse | MockResponseFunction, options?: MockOptionsMethodHead): this; + + /** + * Chainable method that defines how to respond to calls to fetch that + don't match any of the defined mocks. It accepts the same types of + response as a normal call to .mock(matcher, response). It can also + take an arbitrary function to completely customise behaviour of + unmatched calls. If .catch() is called without any parameters then + every unmatched call will receive a 200 response. + * @param [response] Configures the http response returned by the mock + */ + catch(response?: MockResponse | MockResponseFunction): this; + + /** + * Chainable method that records the call history of unmatched calls, + but instead of responding with a stubbed response, the request is + passed through to native fetch() and is allowed to communicate + over the network. Similar to catch(). + */ + spy(response?: MockResponse | MockResponseFunction): this; + /** * Chainable method that restores fetch() to its unstubbed state and clears all data recorded for its calls. */ restore(): this; + /** * Chainable method that clears all data recorded for fetch()'s calls */ reset(): this; + /** * Returns all calls to fetch, grouped by whether fetch-mock matched them or not. @@ -225,42 +340,50 @@ interface FetchMockStatic { /** * Returns all calls to fetch matching matcherName. */ - calls(matcherName?: string): Array; + calls(matcherName?: string): MockCall[]; + /** * Returns a Boolean indicating whether fetch was called and a route - was matched. - */ - called(): boolean; - /** - * Returns a Boolean indicating whether fetch was called and a route - named matcherName was matched. + was matched (or a specific route if matcherName is passed). + * @param [matcherName] either the name of a route or equal to + matcher.toString() for any unnamed route */ called(matcherName?: string): boolean; + /** - * Returns the arguments for the last matched call to fetch - */ - lastCall(): MockCall; - /** - * Returns the arguments for the last call to fetch matching - matcherName + * Returns a Boolean indicating whether fetch was called the expected + number of times (or at least once if the route defines no expectation + is set) for every route (or for a specific route if matcherName is + passed). + * @param [matcherName] either the name of a route or equal to + matcher.toString() for any unnamed route */ - lastCall(matcherName?: string): MockCall; + done(matcherName?: string): boolean; + /** - * Returns the url for the last matched call to fetch + * Returns the arguments for the last matched call to fetch (or the + last call to specific route is matcherName is passed). + * @param [matcherName] either the name of a route or equal to + matcher.toString() for any unnamed route */ - lastUrl(): string; + lastCall(matcherName?: string): MockCall; + /** - * Returns the url for the last call to fetch matching matcherName + * Returns the url for the last matched call to fetch (or the last + call to specific route is matcherName is passed). + * @param [matcherName] either the name of a route or equal to + matcher.toString() for any unnamed route */ lastUrl(matcherName?: string): string; + /** - * Returns the options for the last matched call to fetch - */ - lastOptions(): MockRequest; - /** - * Returns the options for the last call to fetch matching matcherName + * Returns the options for the last matched call to fetch (or the + last call to a specific route is matcherName is passed). + * @param [matcherName] either the name of a route or equal to + matcher.toString() for any unnamed route */ lastOptions(matcherName?: string): MockRequest; + /** * Set some global config options, which include * sendAsJson [default `true`] - by default fetchMock will @@ -268,7 +391,7 @@ interface FetchMockStatic { for each call but for some scenarios, e.g. when dealing with a lot of array buffers, it can be useful to default to `false` */ - configure(opts: Object): void; + configure(opts: {}): void; } declare var fetchMock: FetchMockStatic; diff --git a/fetch-mock/tslint.json b/fetch-mock/tslint.json new file mode 100644 index 0000000000..377cc837d4 --- /dev/null +++ b/fetch-mock/tslint.json @@ -0,0 +1 @@ +{ "extends": "../tslint.json" } From c0a3889ed815e0cece0414ef4413038a9275a277 Mon Sep 17 00:00:00 2001 From: Andy Date: Mon, 9 Jan 2017 14:06:56 -0800 Subject: [PATCH 031/100] Make mocha-node unused to prevent installing @types/node for browser users (#13869) --- mocha/UNUSED_FILES.txt | 2 ++ mocha/tsconfig.json | 4 +--- 2 files changed, 3 insertions(+), 3 deletions(-) create mode 100644 mocha/UNUSED_FILES.txt diff --git a/mocha/UNUSED_FILES.txt b/mocha/UNUSED_FILES.txt new file mode 100644 index 0000000000..2c70329a00 --- /dev/null +++ b/mocha/UNUSED_FILES.txt @@ -0,0 +1,2 @@ +mocha-node.d.ts +mocha-node-tests.ts \ No newline at end of file diff --git a/mocha/tsconfig.json b/mocha/tsconfig.json index 14d99637d1..94ab1840b4 100644 --- a/mocha/tsconfig.json +++ b/mocha/tsconfig.json @@ -15,8 +15,6 @@ }, "files": [ "index.d.ts", - "mocha-tests.ts", - "mocha-node.d.ts", - "mocha-node-tests.ts" + "mocha-tests.ts" ] } \ No newline at end of file From 88fb47df28117fe9d5905d640219bf67f8b61c2a Mon Sep 17 00:00:00 2001 From: Ruslan Arkhipau Date: Mon, 9 Jan 2017 13:23:23 -0800 Subject: [PATCH 032/100] [pem] update typing info for pem 1.9.4 Introduce callback and option interfaces for better type information; enhance compliance with DefinitelyTyped best practices --- pem/index.d.ts | 408 ++++++++++++++++++++++++++++++------------------ pem/tslint.json | 1 + 2 files changed, 260 insertions(+), 149 deletions(-) create mode 100644 pem/tslint.json diff --git a/pem/index.d.ts b/pem/index.d.ts index 8a5f71b729..c523fb8fa7 100644 --- a/pem/index.d.ts +++ b/pem/index.d.ts @@ -1,155 +1,265 @@ -// Type definitions for PEM v1.8.3 +// Type definitions for PEM 1.9 // Project: https://github.com/andris9/pem -// Definitions by: Anthony Trinh +// Definitions by: Anthony Trinh , Ruslan Arkhipau // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -declare module "pem" { +interface ModuleConfiguration { /** - * Creates a private key - * - * @param {Number} [keyBitsize=2048] Size of the key, defaults to 2048bit (can also be a function) - * @param {Object} [options] object of cipher and password {cipher:'aes128',password:'xxx'}, defaults empty object - * @param {Function} callback Callback function with an error object and {key} + * Path to OpenSSL binaries */ - function createPrivateKey(keyBitsize: Number, options: Object, callback: Function): void; - function createPrivateKey(keyBitsize: Number, callback: Function): void; - function createPrivateKey(options: Object, callback: Function): void; - function createPrivateKey(callback: Function): void; - - /** - * Creates a dhparam key - * - * @param {Number} [keyBitsize=512] Size of the key, defaults to 512bit - * @param {Function} callback Callback function with an error object and {dhparam} - */ - function createDhparam(keyBitsize: Number, callback: Function): void; - function createDhparam(callback: Function): void; - - /** - * Creates a Certificate Signing Request - * - * If client key is undefined, a new key is created automatically. The used key is included - * in the callback return as clientKey - * - * @param {Object} [options] Optional options object - * @param {String} [options.clientKey] Optional client key to use - * @param {Number} [options.keyBitsize] If clientKey is undefined, bit size to use for generating a new key (defaults to 2048) - * @param {String} [options.hash] Hash function to use (either md5 sha1 or sha256, defaults to sha256) - * @param {String} [options.country] CSR country field - * @param {String} [options.state] CSR state field - * @param {String} [options.locality] CSR locality field - * @param {String} [options.organization] CSR organization field - * @param {String} [options.organizationUnit] CSR organizational unit field - * @param {String} [options.commonName='localhost'] CSR common name field - * @param {String} [options.emailAddress] CSR email address field - * @param {String} [options.csrConfigFile] CSR config file - * @param {Array} [options.altNames] is a list of subjectAltNames in the subjectAltName field - * @param {Function} callback Callback function with an error object and {csr, clientKey} - */ - function createCSR(options: Object, callback: Function): void; - function createCSR(callback: Function): void; - - /** - * Creates a certificate based on a CSR. If CSR is not defined, a new one - * will be generated automatically. For CSR generation all the options values - * can be used as with createCSR. - * - * @param {Object} [options] Optional options object - * @param {String} [options.serviceKey] Private key for signing the certificate, if not defined a new one is generated - * @param {String} [options.serviceKeyPassword] Password of the service key - * @param {Boolean} [options.selfSigned] If set to true and serviceKey is not defined, use clientKey for signing - * @param {String} [options.hash] Hash function to use (either md5 sha1 or sha256, defaults to sha256) - * @param {String} [options.csr] CSR for the certificate, if not defined a new one is generated - * @param {Number} [options.days] Certificate expire time in days - * @param {String} [options.clientKeyPassword] Password of the client key - * @param {String} [options.extFile] extension config file - without '-extensions v3_req' - * @param {String} [options.config] extension config file - with '-extensions v3_req' - * @param {Function} callback Callback function with an error object and {certificate, csr, clientKey, serviceKey} - */ - function createCertificate(options: Object, callback: Function): void; - function createCertificate(callback: Function): void; - - /** - * Reads subject data from a certificate or a CSR - * - * @param {String} certificate PEM encoded CSR or certificate - * @param {Function} callback Callback function with an error object and {country, state, locality, organization, organizationUnit, commonName, emailAddress} - */ - function readCertificateInfo(certificate: string, callback: Function): void; - function readCertificateInfo(callback: Function): void; - - /** - * Exports a public key from a private key, CSR or certificate - * - * @param {String} certificate PEM encoded private key, CSR or certificate - * @param {Function} callback Callback function with an error object and {publicKey} - */ - function getPublicKey(certificate: string, callback: Function): void; - function getPublicKey(callback: Function): void; - - /** - * Gets the fingerprint for a certificate - * - * @param {String} certificate PEM encoded certificate - * @param {String} hash Hash function to use (either md5 sha1 or sha256, defaults to sha256) - * @param {Function} callback Callback function with an error object and {fingerprint} - */ - function getFingerprint(certificate: string, hash: string, callback: Function): void; - function getFingerprint(certificate: string, callback: Function): void; - function getFingerprint(callback: Function): void; - - /** - * Gets the modulus from a certificate, a CSR or a private key - * - * @param {String} certificate PEM encoded, CSR PEM encoded, or private key - * @param {String} password password for the certificate - * @param {Function} callback Callback function with an error object and {modulus} - */ - function getModulus(certificate: string, password: string, callback: Function): void; - function getModulus(certificate: string, callback: Function): void; - - /** - * Gets the size and prime of DH parameters - * - * @param {String} dh DH parameters PEM encoded - * @param {Function} callback Callback function with an error object and {size, prime} - */ - function getDhparamInfo(dh: string, callback: Function): void; - - /** - * Exports private key and certificate to a PKCS12 keystore - * - * @param {String} key PEM encoded private key - * @param {String} certificate PEM encoded certificate - * @param {String} password Password of the result PKCS12 file - * @param {Object} [options] object of cipher and optional client key password {cipher:'aes128', clientKeyPassword: 'xxx'} - * @param {Function} callback Callback function with an error object and {pkcs12} - */ - function createPkcs12(key: string, certificate: string, password: string, options: Object, callback: Function): void; - function createPkcs12(key: string, certificate: string, password: string, callback: Function): void; - - /** - * Reads private key and certificate from a PKCS12 keystore - * @param {String} bufferOrPath - * @param {Object} [options] object of cipher and optional client key password {cipher:'aes128', clientKeyPassword: 'xxx'} - * @param {Function} callback Callback function with an error object and {pkcs12} - * @returns the result of the callback - */ - function readPkcs12(bufferOrPath: string, options: Object, callback: Function): any; - function readPkcs12(options: Object, callback: Function): any; - - /** - * Verifies the signing chain of the passed certificate - * - * @param {String} certificate PEM encoded certificate - * @param {Array} ca List of CA certificates - * @param {Function} callback Callback function with an error object and a boolean valid - */ - function verifySigningChain(certificate: string, ca: Array, callback: Function): void; - - /** - * config the pem module - * @param {Object} options - */ - function config(options: Object): void; + pathOpenSSL: string; } + +export type PrivateKeyCipher = "aes128" | "aes192" | "aes256" | "camellia128" | "camellia192" | "camellia256" | "des" | "des3" | "idea" | string; // allow for additions in future + +interface PrivateKeyCreationOptions { + cipher: PrivateKeyCipher; + password: string; +} + +interface Pkcs12CreationOptions { + cipher?: PrivateKeyCipher; + clientKeyPassword?: string; + certFiles?: string[]; +} + +interface Pkcs12ReadOptions { + p12Password?: string; + clientKeyPassword?: string; +} + +export type HashFunction = 'md5' | 'sha1' | 'sha256' | string; +interface CSRCreationOptions { + /** + * Optional client key to use + */ + clientKey?: string; + clientKeyPassword?: string; + /** + * If clientKey is undefined, bit size to use for generating a new key (defaults to 2048) + */ + keyBitsize?: number; + /** + * Hash function to use, defaults to sha256 + */ + hash?: HashFunction; + /** + * CSR country field + */ + country?: string; + /** + * CSR state field + */ + state?: string; + /** + * CSR locality field + */ + locality?: string; + /** + * CSR organization field + */ + organization?: string; + /** + * CSR organizational unit field + */ + organizationUnit?: string; + /** + * CSR common name field, defaults to 'localhost' + */ + commonName?: string; + /** + * CSR email address field + */ + emailAddress?: string; + /** + * CSR config file + */ + csrConfigFile?: string; + /** + * A list of subjectAltNames in the subjectAltName field + */ + altNames?: string[]; +} + +interface CertificateCreationOptions extends CSRCreationOptions { + /** + * Private key for signing the certificate, if not defined a new one is generated + */ + serviceKey?: string; + /** + * Password of the service key + */ + serviceKeyPassword?: string; + serviceCertificate?: any; + serial?: any; + /** + * If set to true and serviceKey is not defined, use clientKey for signing + */ + selfSigned?: boolean; + /** + * CSR for the certificate, if not defined a new one is generated from the provided parameters + */ + csr?: string; + /** + * Certificate expire time in days, defaults to 365 + */ + days?: number; + /** + * Password of the client key + */ + clientKeyPassword?: string; + /** + * extension config file - without '-extensions v3_req' + */ + extFile?: string; + /** + * extension config file - with '-extensions v3_req' + */ + config?: string; +} + +interface CertificateCreationResult { + certificate: any; + csr: string; + clientKey: string; + serviceKey: string; +} + +interface CertificateSubjectReadResult { + country: string; + state: string; + locality: string; + organization: string; + organizationUnit: string; + commonName: string; + emailAddress: string; +} + +type Callback = (error: any, result: T) => any; + +/** + * Creates a private key + * + * @param {number} [keyBitsize=2048] Size of the key, defaults to 2048bit (can also be a function) + * @param {PrivateKeyCreationOptions} [options] private key encryption settings, defaults to empty object (no enryption) + * @param {Callback<{ key: string }>} callback Callback function with an error object and {key} + */ +declare function createPrivateKey(keyBitsize: number, options: PrivateKeyCreationOptions, callback: Callback<{ key: string }>): void; +declare function createPrivateKey(optionsOrKeyBitsize: number | PrivateKeyCreationOptions, callback: Callback<{ key: string }>): void; +declare function createPrivateKey(callback: Callback<{ key: string }>): void; + +/** + * Creates a dhparam key + * + * @param {Number} [keyBitsize=512] Size of the key, defaults to 512bit + * @param {Callback<{ dhparam: any }>} callback Callback function with an error object and {dhparam} + */ +declare function createDhparam(keyBitsize: number, callback: Callback<{ dhparam: any }>): void; +declare function createDhparam(callback: Callback<{ dhparam: any }>): void; + +/** + * Creates a Certificate Signing Request + * + * If options.clientKey is undefined, a new key is created automatically. The used key is included + * in the callback return as clientKey + * + * @param {CSRCreationOptions} [options] Optional options object + * @param {Callback<{ csr: string, clientKey: string }>} callback Callback function with an error object and {csr, clientKey} + */ +declare function createCSR(options: CSRCreationOptions, callback: Callback<{ csr: string, clientKey: string }>): void; +declare function createCSR(callback: Callback<{ csr: string, clientKey: string }>): void; + +/** + * Creates a certificate based on a CSR. If CSR is not defined, a new one + * will be generated automatically. For CSR generation all the options values + * can be used as with createCSR. + * + * @param {Object} [CertificateCreationOptions] Optional options object + * @param {Callback} callback Callback function with an error object and {certificate, csr, clientKey, serviceKey} + */ +declare function createCertificate(options: CertificateCreationOptions, callback: Callback): void; +declare function createCertificate(callback: Callback): void; + +/** + * Reads subject data from a certificate or a CSR + * + * @param {String} certificate PEM encoded CSR or certificate + * @param {Callback} callback Callback function with an error object and {country, state, locality, organization, organizationUnit, commonName, emailAddress} + */ +declare function readCertificateInfo(certificate: string, callback: Callback): void; +declare function readCertificateInfo(callback: Callback): void; + +/** + * Exports a public key from a private key, CSR or certificate + * + * @param {String} certificate PEM encoded private key, CSR or certificate + * @param {Callback<{ publicKey: string }>} callback Callback function with an error object and {publicKey} + */ +declare function getPublicKey(certificate: string, callback: Callback<{ publicKey: string }>): void; +declare function getPublicKey(callback: Callback<{ publicKey: string }>): void; + +/** + * Gets the fingerprint for a certificate + * + * @param {String} certificate PEM encoded certificate + * @param {HashFunction} hash Hash function to use (either md5 sha1 or sha256, defaults to sha256) + * @param {Callback<{ fingerprint: string }>} callback Callback function with an error object and {fingerprint} + */ +declare function getFingerprint(certificate: string, hash: HashFunction, callback: Callback<{ fingerprint: string }>): void; +declare function getFingerprint(certificate: string, callback: Callback<{ fingerprint: string }>): void; +declare function getFingerprint(callback: Callback<{ fingerprint: string }>): void; + +/** + * Gets the modulus from a certificate, a CSR or a private key + * + * @param {String} certificate PEM encoded, CSR PEM encoded, or private key + * @param {String} password password for the certificate + * @param {Callback<{ modulus: any }>} callback Callback function with an error object and {modulus} + */ +declare function getModulus(certificate: string, password: string, callback: Callback<{ modulus: any }>): void; +declare function getModulus(certificate: string, callback: Callback<{ modulus: any }>): void; + +/** + * Gets the size and prime of DH parameters + * + * @param {String} dh DH parameters PEM encoded + * @param {Callback<{ size: any, prime: any }>} callback Callback function with an error object and {size, prime} + */ +declare function getDhparamInfo(dh: string, callback: Callback<{ size: any, prime: any }>): void; + +/** + * Exports private key and certificate to a PKCS12 keystore + * + * @param {String} key PEM encoded private key + * @param {String} certificate PEM encoded certificate + * @param {String} password Password of the result PKCS12 file + * @param {Pkcs12CreationOptions} [options] object of cipher and optional client key password {cipher:'aes128', clientKeyPassword: 'xxx'} + * @param {Callback<{ pkcs12: any }>} callback Callback function with an error object and {pkcs12} + */ +declare function createPkcs12(key: string, certificate: string, password: string, options: Pkcs12CreationOptions, callback: Callback<{ pkcs12: any }>): void; +declare function createPkcs12(key: string, certificate: string, password: string, callback: Callback<{ pkcs12: any }>): void; + +/** + * Reads private key and certificate from a PKCS12 keystore + * @param {String} bufferOrPath + * @param {Pkcs12ReadOptions} [options] + * @param {Function} callback Callback function with an error object and {pkcs12} + * @returns the result of the callback + */ +declare function readPkcs12(bufferOrPath: string, options: Pkcs12ReadOptions, callback: Callback<{ pkcs12: any }>): any; +declare function readPkcs12(bufferOrPath: string, callback: Callback<{ pkcs12: any }>): any; + +/** + * Verifies the signing chain of the passed certificate + * + * @param {String} certificate PEM encoded certificate + * @param {string[]} ca List of CA certificates + * @param {Function} callback Callback function with an error object and a boolean valid + */ +declare function verifySigningChain(certificate: string, ca: string[], callback: Callback): void; + +/** + * config the pem module + * @param {ModuleConfiguration} options + */ +declare function config(options: ModuleConfiguration): void; diff --git a/pem/tslint.json b/pem/tslint.json new file mode 100644 index 0000000000..377cc837d4 --- /dev/null +++ b/pem/tslint.json @@ -0,0 +1 @@ +{ "extends": "../tslint.json" } From 02c9c550917194ba2512b60316bab9aa2f14c003 Mon Sep 17 00:00:00 2001 From: Alexey Svetliakov Date: Tue, 10 Jan 2017 03:49:01 +0100 Subject: [PATCH 033/100] Move CSSTransitionGroupProps to react module --- react-addons-css-transition-group/index.d.ts | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/react-addons-css-transition-group/index.d.ts b/react-addons-css-transition-group/index.d.ts index b57b39ab69..77fc5c95e6 100644 --- a/react-addons-css-transition-group/index.d.ts +++ b/react-addons-css-transition-group/index.d.ts @@ -4,13 +4,9 @@ // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped import 'react-addons-transition-group'; -import { ComponentClass, TransitionGroupProps } from 'react'; +import { ComponentClass, TransitionGroupProps, CSSTransitionGroupProps } from 'react'; -declare var CSSTransitionGroup: CSSTransitionGroup; -type CSSTransitionGroup = ComponentClass; -export = CSSTransitionGroup; - -declare namespace CSSTransitionGroup { +declare module 'react' { interface CSSTransitionGroupTransitionName { enter: string; enterActive?: string; @@ -20,7 +16,7 @@ declare namespace CSSTransitionGroup { appearActive?: string; } - interface CSSTransitionGroupProps extends TransitionGroupProps { + export interface CSSTransitionGroupProps extends TransitionGroupProps { transitionName: string | CSSTransitionGroupTransitionName; transitionAppear?: boolean; transitionAppearTimeout?: number; @@ -30,3 +26,8 @@ declare namespace CSSTransitionGroup { transitionLeaveTimeout?: number; } } + +declare var CSSTransitionGroup: CSSTransitionGroup; +type CSSTransitionGroup = ComponentClass; +export = CSSTransitionGroup; + From 11a075529c9a10a0c2416c3c63ea54ad5c392e18 Mon Sep 17 00:00:00 2001 From: Alexey Svetliakov Date: Tue, 10 Jan 2017 03:50:03 +0100 Subject: [PATCH 034/100] Bump version --- react-addons-css-transition-group/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/react-addons-css-transition-group/index.d.ts b/react-addons-css-transition-group/index.d.ts index 77fc5c95e6..c8ccf83ebe 100644 --- a/react-addons-css-transition-group/index.d.ts +++ b/react-addons-css-transition-group/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for React (react-addons-css-transition-group) 0.14 +// Type definitions for React (react-addons-css-transition-group) 15.0 // Project: http://facebook.github.io/react/ // Definitions by: Asana , AssureSign , Microsoft // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped From 9e0c7a2809eb2de8bf621a789cbc7a872a6a9f82 Mon Sep 17 00:00:00 2001 From: Alexey Svetliakov Date: Tue, 10 Jan 2017 04:24:40 +0100 Subject: [PATCH 035/100] Fixed dependent module --- react-css-transition-replace/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/react-css-transition-replace/index.d.ts b/react-css-transition-replace/index.d.ts index 292e45e5e5..88a8d11ffd 100644 --- a/react-css-transition-replace/index.d.ts +++ b/react-css-transition-replace/index.d.ts @@ -7,7 +7,7 @@ import * as React from "react"; import * as CSSTransitionGroup from "react-addons-css-transition-group"; declare namespace CSSTransitionReplace { - interface Props extends CSSTransitionGroup.CSSTransitionGroupProps { + interface Props extends React.CSSTransitionGroupProps { overflowHidden?: boolean } } From da39e1d4fc33ae8ec2a5ee5090929f3b3b02e308 Mon Sep 17 00:00:00 2001 From: Alexey Svetliakov Date: Tue, 10 Jan 2017 04:27:05 +0100 Subject: [PATCH 036/100] react-event-listener definitions --- react-event-listener/index.d.ts | 226 ++++++++++++++++++ .../react-event-listener-tests.tsx | 6 + react-event-listener/tsconfig.json | 21 ++ react-event-listener/tslint.json | 1 + 4 files changed, 254 insertions(+) create mode 100644 react-event-listener/index.d.ts create mode 100644 react-event-listener/react-event-listener-tests.tsx create mode 100644 react-event-listener/tsconfig.json create mode 100644 react-event-listener/tslint.json diff --git a/react-event-listener/index.d.ts b/react-event-listener/index.d.ts new file mode 100644 index 0000000000..5e0915b893 --- /dev/null +++ b/react-event-listener/index.d.ts @@ -0,0 +1,226 @@ +// Type definitions for react-event-listener 0.4.0 +// Project: https://github.com/oliviertassinari/react-event-listener +// Definitions by: Alexey Svetliakov +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +import * as React from "react"; + +interface EventOptions { + /** + * @default false + */ + passive?: boolean; + /** + * @default false + */ + capture?: boolean; +} + +export function withOptions(handler: (ev: T) => any, options: EventOptions): (ev: T) => any; + +export interface EventListenerProps { + // Global events + onPointerCancel?: (ev: PointerEvent) => any; + onPointerCancelCapture?: (ev: PointerEvent) => any; + onPointerDown?: (ev: PointerEvent) => any; + onPointerDownCapture?: (ev: PointerEvent) => any; + onPointerEnter?: (ev: PointerEvent) => any; + onPointerEnterCapture?: (ev: PointerEvent) => any; + onPointerLeave?: (ev: PointerEvent) => any; + onPointerLeaveCapture?: (ev: PointerEvent) => any; + onPointerMove?: (ev: PointerEvent) => any; + onPointerMoveCapture?: (ev: PointerEvent) => any; + onPointerOut?: (ev: PointerEvent) => any; + onPointerOutCapture?: (ev: PointerEvent) => any; + onPointerOver?: (ev: PointerEvent) => any; + onPointerOverCapture?: (ev: PointerEvent) => any; + onPointerUp?: (ev: PointerEvent) => any; + onPointerUpCapture?: (ev: PointerEvent) => any; + onWheel?: (ev: WheelEvent) => any; + onWheelCapture?: (ev: WheelEvent) => any; + onAbort?: (ev: Event) => any; + onAbortCapture?: (ev: Event) => any; + onAfterPrint?: (ev: Event) => any; + onAfterPrintCapture?: (ev: Event) => any; + onBeforePrint?: (ev: Event) => any; + onBeforePrintCapture?: (ev: Event) => any; + onBeforeUnload?: (ev: BeforeUnloadEvent) => any; + onBeforeUnloadCapture?: (ev: BeforeUnloadEvent) => any; + onBlur?: (ev: FocusEvent) => any; + onBlurCapture?: (ev: FocusEvent) => any; + onCanPlay?: (ev: Event) => any; + onCanPlayCapture?: (ev: Event) => any; + onCanPlayThrough?: (ev: Event) => any; + onCanPlayThroughCapture?: (ev: Event) => any; + onChange?: (ev: Event) => any; + onChangeCapture?: (ev: Event) => any; + onClick?: (ev: MouseEvent) => any; + onClickCapture?: (ev: MouseEvent) => any; + onCompassNeedsCalibration?: (ev: Event) => any; + onCompassNeedsCalibrationCapture?: (ev: Event) => any; + onContextMenu?: (ev: PointerEvent) => any; + onContextMenuCapture?: (ev: PointerEvent) => any; + onDblClick?: (ev: MouseEvent) => any; + onDblClickCapture?: (ev: MouseEvent) => any; + onDeviceMotion?: (ev: DeviceMotionEvent) => any; + onDeviceMotionCapture?: (ev: DeviceMotionEvent) => any; + onDeviceOrientation?: (ev: DeviceOrientationEvent) => any; + onDeviceOrientationCapture?: (ev: DeviceOrientationEvent) => any; + onDrag?: (ev: DragEvent) => any; + onDragCapture?: (ev: DragEvent) => any; + onDragEnd?: (ev: DragEvent) => any; + onDragEndCapture?: (ev: DragEvent) => any; + onDragEnter?: (ev: DragEvent) => any; + onDragEnterCapture?: (ev: DragEvent) => any; + onDragLeave?: (ev: DragEvent) => any; + onDragLeaveCapture?: (ev: DragEvent) => any; + onDragOver?: (ev: DragEvent) => any; + onDragOverCapture?: (ev: DragEvent) => any; + onDragStart?: (ev: DragEvent) => any; + onDragStartCapture?: (ev: DragEvent) => any; + onDrop?: (ev: DragEvent) => any; + onDropCapture?: (ev: DragEvent) => any; + onDurationChange?: (ev: Event) => any; + onDurationChangeCapture?: (ev: Event) => any; + onEmptied?: (ev: Event) => any; + onEmptiedCapture?: (ev: Event) => any; + onEnded?: (ev: Event) => any; + onEndedCapture?: (ev: Event) => any; + onError?: ErrorEventHandler; + onErrorCapture?: ErrorEventHandler; + onFocus?: (ev: FocusEvent) => any; + onFocusCapture?: (ev: FocusEvent) => any; + onHashChange?: (ev: HashChangeEvent) => any; + onHashChangeCapture?: (ev: HashChangeEvent) => any; + onInput?: (ev: Event) => any; + onInputCapture?: (ev: Event) => any; + onKeyDown?: (ev: KeyboardEvent) => any; + onKeyDownCapture?: (ev: KeyboardEvent) => any; + onKeyPress?: (ev: KeyboardEvent) => any; + onKeyPressCapture?: (ev: KeyboardEvent) => any; + onKeyUp?: (ev: KeyboardEvent) => any; + onKeyUpCapture?: (ev: KeyboardEvent) => any; + onLoad?: (ev: Event) => any; + onLoadCapture?: (ev: Event) => any; + onLoadedData?: (ev: Event) => any; + onLoadedDataCapture?: (ev: Event) => any; + onLoadedMetadata?: (ev: Event) => any; + onLoadedMetadataCapture?: (ev: Event) => any; + onLoadStart?: (ev: Event) => any; + onLoadStartCapture?: (ev: Event) => any; + onMessage?: (ev: MessageEvent) => any; + onMessageCapture?: (ev: MessageEvent) => any; + onMouseDown?: (ev: MouseEvent) => any; + onMouseDownCapture?: (ev: MouseEvent) => any; + onMouseEnter?: (ev: MouseEvent) => any; + onMouseEnterCapture?: (ev: MouseEvent) => any; + onMouseLeave?: (ev: MouseEvent) => any; + onMouseLeaveCapture?: (ev: MouseEvent) => any; + onMouseMove?: (ev: MouseEvent) => any; + onMouseMoveCapture?: (ev: MouseEvent) => any; + onMouseOut?: (ev: MouseEvent) => any; + onMouseOutCapture?: (ev: MouseEvent) => any; + onMouseOver?: (ev: MouseEvent) => any; + onMouseOverCapture?: (ev: MouseEvent) => any; + onMouseUp?: (ev: MouseEvent) => any; + onMouseUpCapture?: (ev: MouseEvent) => any; + onMouseWheel?: (ev: MouseWheelEvent) => any; + onMouseWheelCapture?: (ev: MouseWheelEvent) => any; + onMsGestureChange?: (ev: MSGestureEvent) => any; + onMsGestureChangeCapture?: (ev: MSGestureEvent) => any; + onMsGestureDoubleTap?: (ev: MSGestureEvent) => any; + onMsGestureDoubleTapCapture?: (ev: MSGestureEvent) => any; + onMsGestureEnd?: (ev: MSGestureEvent) => any; + onMsGestureEndCapture?: (ev: MSGestureEvent) => any; + onMsGestureHold?: (ev: MSGestureEvent) => any; + onMsGestureHoldCapture?: (ev: MSGestureEvent) => any; + onMsGestureStart?: (ev: MSGestureEvent) => any; + onMsGestureStartCapture?: (ev: MSGestureEvent) => any; + onMsGestureTap?: (ev: MSGestureEvent) => any; + onMsGestureTapCapture?: (ev: MSGestureEvent) => any; + onMsInertiaStart?: (ev: MSGestureEvent) => any; + onMsInertiaStartCapture?: (ev: MSGestureEvent) => any; + onMsPointerCancel?: (ev: MSPointerEvent) => any; + onMsPointerCancelCapture?: (ev: MSPointerEvent) => any; + onMsPointerDown?: (ev: MSPointerEvent) => any; + onMsPointerDownCapture?: (ev: MSPointerEvent) => any; + onMsPointerEnter?: (ev: MSPointerEvent) => any; + onMsPointerEnterCapture?: (ev: MSPointerEvent) => any; + onMsPointerLeave?: (ev: MSPointerEvent) => any; + onMsPointerLeaveCapture?: (ev: MSPointerEvent) => any; + onMsPointerMove?: (ev: MSPointerEvent) => any; + onMsPointerMoveCapture?: (ev: MSPointerEvent) => any; + onMsPointerOut?: (ev: MSPointerEvent) => any; + onMsPointerOutCapture?: (ev: MSPointerEvent) => any; + onMsPointerOver?: (ev: MSPointerEvent) => any; + onMsPointerOverCapture?: (ev: MSPointerEvent) => any; + oNmsPointerUp?: (ev: MSPointerEvent) => any; + oNmsPointerUpCapture?: (ev: MSPointerEvent) => any; + onOffline?: (ev: Event) => any; + onOfflineCapture?: (ev: Event) => any; + onOnline?: (ev: Event) => any; + onOnlineCapture?: (ev: Event) => any; + onOrientationChange?: (ev: Event) => any; + onOrientationChangeCapture?: (ev: Event) => any; + onPageHide?: (ev: PageTransitionEvent) => any; + onPageHideCapture?: (ev: PageTransitionEvent) => any; + onPageShow?: (ev: PageTransitionEvent) => any; + onPageShowCapture?: (ev: PageTransitionEvent) => any; + onPause?: (ev: Event) => any; + onPauseCapture?: (ev: Event) => any; + onPlay?: (ev: Event) => any; + onPlayCapture?: (ev: Event) => any; + onPlaying?: (ev: Event) => any; + onPlayingCapture?: (ev: Event) => any; + onPopState?: (ev: PopStateEvent) => any; + onPopStateCapture?: (ev: PopStateEvent) => any; + onProgress?: (ev: ProgressEvent) => any; + onProgressCapture?: (ev: ProgressEvent) => any; + onRateChange?: (ev: Event) => any; + onRateChangeCapture?: (ev: Event) => any; + onReadyStateChange?: (ev: ProgressEvent) => any; + onReadyStateChangeCapture?: (ev: ProgressEvent) => any; + onReset?: (ev: Event) => any; + onResetCapture?: (ev: Event) => any; + onResize?: (ev: UIEvent) => any; + onResizeCapture?: (ev: UIEvent) => any; + onScroll?: (ev: UIEvent) => any; + onScrollCapture?: (ev: UIEvent) => any; + onSeeked?: (ev: Event) => any; + onSeekedCapture?: (ev: Event) => any; + onSeeking?: (ev: Event) => any; + onSeekingCapture?: (ev: Event) => any; + onSelect?: (ev: UIEvent) => any; + onSelectCapture?: (ev: UIEvent) => any; + onStalled?: (ev: Event) => any; + onStalledCapture?: (ev: Event) => any; + onStorage?: (ev: StorageEvent) => any; + onStorageCapture?: (ev: StorageEvent) => any; + onSubmit?: (ev: Event) => any; + onSubmitCapture?: (ev: Event) => any; + onSuspend?: (ev: Event) => any; + onSuspendCapture?: (ev: Event) => any; + onTimeUpdate?: (ev: Event) => any; + onTimeUpdateCapture?: (ev: Event) => any; + onTouchCancel?: any; + onTouchCancelCapture?: any; + onTouchEnd?: any; + onTouchEndCapture?: any; + onTouchMove?: any; + onTouchMoveCapture?: any; + onTouchStart?: any; + onTouchStartCapture?: any; + onUnload?: (ev: Event) => any; + onUnloadCapture?: (ev: Event) => any; + onVolumeChange?: (ev: Event) => any; + onVolumeChangeCapture?: (ev: Event) => any; + onWaiting?: (ev: Event) => any; + onWaitingCapture?: (ev: Event) => any; + + /** + * Target (window or document) + */ + target: Window | Document | string; +} + +export default class EventListener extends React.Component { } diff --git a/react-event-listener/react-event-listener-tests.tsx b/react-event-listener/react-event-listener-tests.tsx new file mode 100644 index 0000000000..194ab97e7f --- /dev/null +++ b/react-event-listener/react-event-listener-tests.tsx @@ -0,0 +1,6 @@ +import * as React from "react"; +import EventListener, { withOptions } from "react-event-listener"; + + { }} />; + { }, { passive: true, capture: true })} />; + { }}/> diff --git a/react-event-listener/tsconfig.json b/react-event-listener/tsconfig.json new file mode 100644 index 0000000000..619baa483a --- /dev/null +++ b/react-event-listener/tsconfig.json @@ -0,0 +1,21 @@ +{ + "compilerOptions": { + "module": "commonjs", + "target": "es6", + "jsx": "react", + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "react-event-listener-tests.tsx" + ] +} diff --git a/react-event-listener/tslint.json b/react-event-listener/tslint.json new file mode 100644 index 0000000000..377cc837d4 --- /dev/null +++ b/react-event-listener/tslint.json @@ -0,0 +1 @@ +{ "extends": "../tslint.json" } From 82a1b10c6b295321bdbbf89c0afe424e58de5adf Mon Sep 17 00:00:00 2001 From: Alexey Svetliakov Date: Tue, 10 Jan 2017 04:50:55 +0100 Subject: [PATCH 037/100] Fix version --- react-event-listener/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/react-event-listener/index.d.ts b/react-event-listener/index.d.ts index 5e0915b893..7fefddbe7b 100644 --- a/react-event-listener/index.d.ts +++ b/react-event-listener/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for react-event-listener 0.4.0 +// Type definitions for react-event-listener 0.4 // Project: https://github.com/oliviertassinari/react-event-listener // Definitions by: Alexey Svetliakov // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped From 1fe97bbf37387bb737d1581bc18d5bdc90022a6f Mon Sep 17 00:00:00 2001 From: Peter Safranek Date: Mon, 9 Jan 2017 20:02:52 -0800 Subject: [PATCH 038/100] Add 'extensions' option. --- koa-send/index.d.ts | 3 ++- koa-send/koa-send-tests.ts | 1 + koa-send/koa-send.d.ts | 27 --------------------------- 3 files changed, 3 insertions(+), 28 deletions(-) delete mode 100644 koa-send/koa-send.d.ts diff --git a/koa-send/index.d.ts b/koa-send/index.d.ts index f8424c1a85..521e96036e 100644 --- a/koa-send/index.d.ts +++ b/koa-send/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for koa-send v3.x +// Type definitions for koa-send v3.3 // Project: https://github.com/koajs/send // Definitions by: Peter Safranek // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped @@ -13,6 +13,7 @@ interface ISendOptions { format?: boolean; gzip?: boolean; setHeaders?: Function; + extensions?: string[]; } declare function send(ctx: Koa.Context, path: string, opts?: ISendOptions): Promise; diff --git a/koa-send/koa-send-tests.ts b/koa-send/koa-send-tests.ts index e231d4e6b3..88a6f16abb 100644 --- a/koa-send/koa-send-tests.ts +++ b/koa-send/koa-send-tests.ts @@ -17,5 +17,6 @@ app.use(async (ctx: Koa.Context) => { format: true, gzip: true, setHeaders: () => {}, + extensions: ['shemp'], }); }); diff --git a/koa-send/koa-send.d.ts b/koa-send/koa-send.d.ts deleted file mode 100644 index 9ed8805412..0000000000 --- a/koa-send/koa-send.d.ts +++ /dev/null @@ -1,27 +0,0 @@ -// Type definitions for koa-send v3.x -// Project: https://github.com/koajs/send -// Definitions by: Peter Safranek -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped - -/// - -declare module "koa-send" { - - import * as Koa from "koa"; - - interface ISendOptions { - root?: string; - index?: string; - maxAge?: number; - hidden?: boolean; - format?: boolean; - gzip?: boolean; - setHeaders?: Function; - } - - function send(ctx: Koa.Context, path: string, opts?: ISendOptions): Promise; - - namespace send {} - - export = send; -} From 536734f6e0f47475388eac44a392cdeff250b614 Mon Sep 17 00:00:00 2001 From: Alexey Svetliakov Date: Tue, 10 Jan 2017 06:12:30 +0100 Subject: [PATCH 039/100] Initial commit --- smooth-scrollbar/index.d.ts | 277 +++++++++++++++++++++ smooth-scrollbar/smooth-scrollbar-tests.ts | 31 +++ smooth-scrollbar/tsconfig.json | 20 ++ smooth-scrollbar/tslint.json | 1 + 4 files changed, 329 insertions(+) create mode 100644 smooth-scrollbar/index.d.ts create mode 100644 smooth-scrollbar/smooth-scrollbar-tests.ts create mode 100644 smooth-scrollbar/tsconfig.json create mode 100644 smooth-scrollbar/tslint.json diff --git a/smooth-scrollbar/index.d.ts b/smooth-scrollbar/index.d.ts new file mode 100644 index 0000000000..7962a4f9ee --- /dev/null +++ b/smooth-scrollbar/index.d.ts @@ -0,0 +1,277 @@ +// Type definitions for smooth-scrollbar 7.2 +// Project: https://github.com/idiotWu/smooth-scrollbar +// Definitions by: Alexey Svetliakov +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +export as namespace Scrollbar; + +export interface ScrollbarOptions { + /** + * Scrolling speed scale. + * @default 1 + */ + speed?: number; + /** + * Delta reduction damping, a float value between (0, 1), the lower the value is, the more smooth the scrolling will be. + * @default 0.1 + */ + damping?: number; + /** + * Minimal size for scrollbar thumb. + * @default 20 + */ + thumbMinSize?: number; + /** + * Execute listeners in synchronous or asynchronous. + * @default false + */ + syncCallbacks?: boolean; + /** + * Render scrolling by integer pixels, set to true to improve performance. + * @default true + */ + renderByPixels?: boolean; + /** + * Whether allow upper scrollable content to continue scrolling when current scrollbar reaches edge. + * When set to "auto", it will be enabled on nested scrollbars, and disabled on first-class scrollbars. + * @default "auto" + */ + continuousScrolling?: boolean | "auto"; + /** + * Experimental overscroll effect, "bounce" for iOS style effect and "glow" for Android style effect. + * Be careful when you enable this feature! + * @default false + */ + overscrollEffect?: boolean | "bounce" | "glow"; + /** + * Canvas paint color with 'glow' effect. + * @default "#87ceeb" + */ + overscrollEffectColor?: string; + /** + * The same as damping, but for overscrolling. + * @default 0.2 + */ + overscrollDamping?: number; +} + +export interface ScrollbarTargets { + readonly container: HTMLElement; + readonly content: HTMLElement; + readonly xAxis: { + readonly track: HTMLElement; + readonly thumb: HTMLElement; + }; + readonly yAxis: { + readonly track: HTMLElement; + readonly thumb: HTMLElement; + } +} + +interface ScrollIntoViewOptions { + /** + * scrolling stop offset to top edge of container + * @default 0 + */ + offsetTop?: number; + /** + * scrolling stop offset to left edge of container + * @default 0 + */ + offsetLeft?: number; + /** + * whether to scroll container when target element is visible + * @default false + */ + onlyScrollIfNeeded?: boolean; +} + +export interface ScrollStatusObject { + /** + * Scrolling direction + */ + direction: { + x: "none" | "right" | "left"; + y: "none" | "up" | "down"; + }; + /** + * Scrolling offset + */ + offset: { + x: number; + y: number; + }; + /** + * Max scroll distance in px + */ + limit: { + x: number; + y: number; + }; +} + +export default class Scrollbar { + /** + * Init scrollbar on given element, and returns scrollbar instance + * @param {HTMLElement} element Element to init scrollbar + * @param {ScrollbarOptions} options Scrollbar options + * @return {Scrollbar} Scrollbar instance + */ + static init(element: HTMLElement, options?: ScrollbarOptions): Scrollbar; + /** + * Automatically init scrollbar on all elements refer to selector scrollbar, [scrollbar], [data-scrollbar] + * @return {Scrollbar[]} An array of scrollbars + */ + static initAll(options?: ScrollbarOptions): Scrollbar[]; + /** + * Check if scrollbar exists on given element: + * @param {HTMLElement} element HTML element + * @return {boolean} + */ + static has(element: HTMLElement): boolean; + /** + * Get scrollbar on the given element + * @param {HTMLElement} element HTML element + * @return {Scrollbar|undefined} Scrollbar instance of undefined if element doesn't have scrollbar + */ + static get(element: HTMLElement): Scrollbar | undefined; + /** + * Get all scrollbar instances + * @return {Scrollbar[]} An array of scrollbar instances + */ + static getAll(): Scrollbar[]; + /** + * Remove scrollbar on the given element + * @param {HTMLElement} element HTML element + * @param {boolean} isRemoval + */ + static destroy(element: HTMLElement, isRemoval?: boolean): void; + /** + * Destroys all scrollbar instances + */ + static destroyAll(): void; + /** + * Current scrollbar targets + */ + public readonly targets: ScrollbarTargets; + /** + * Current scrolling offset + */ + public offset: { + x: number; + y: number; + }; + /** + * Max scrolling offset + */ + public limit: { + x: number; + y: number; + } + /** + * Alias for offset.y + */ + public scrollTop: number; + /** + * Alias for offset.x + */ + public scrollLeft: number; + + /** + * Scrollbars are automatically updated with 100ms debounce (or childList changes if MutationObserver is supported). + * You can call update() to force an update, this will be useful when you modified contents inside scrollbar + * @param {boolean} async By default, updating will operate synchronously, set to true to update asynchronously (in next frame). + */ + public update(async?: boolean): void; + /** + * Return the size of scrollbar container and scroll content + * @return {Object} Container and content dimensions + */ + public getSize(): { container: { width: number; height: number }; content: { width: number; height: number } }; + /** + * Like window.scrollTo(), scroll content will be set to the given position immediately. + * @param {number} x X position + * @param {number} y Y position + * @param {boolean} withoutCallbacks Set to true to disable callback functions temporarily. + */ + setPosition(x: number, y: number, withoutCallbacks?: boolean): void; + /** + * Scroll to given position with easing, callback will be invoked with instance after scrolling: + * @param {number} x X position + * @param {number} y Y position + * @param {number} duration description + * @param {Function} callback Callback + */ + scrollTo(x: number, y: number, duration?: number, callback?: (instance: this) => void): void; + /** + * Scroll target element into visible area of scrollbar, like DOM method element.scrollIntoView(). + * This will be helpful when you want to create some anchors. + * @param {HTMLElement} element Element to scroll into + * @param {ScrollIntoViewOptions} options Options + */ + scrollIntoView(element: HTMLElement, options?: ScrollIntoViewOptions): void; + /** + * Check if an element is visible in the current view area. + * @param {HTMLElement} element HTML element + * @return {boolean} True/false + */ + isVisible(element: HTMLElement): boolean; + /** + * Register scrolling listener to scrollbar instance, callbacks will be invoked in every small scrolling. + * @param {Function} listener A listener + */ + addListener(listener: (status: ScrollStatusObject) => void): void; + /** + * Remove the given listeneer from listeners collection, like Element.removeEventListener(). + * @param {Function} listener A listener + */ + removeListener(listener: (status: ScrollStatusObject) => void): void; + /** + * This is another useful method when you want to make infinite scrolling. + * Callbacks will be invoked with status object when you scrolling down over a threshold. + * @param {Function} listener A listener + * @param {number} threshold Threshold, default 50 + */ + infiniteScroll(listener: (status: ScrollStatusObject) => void, threshold?: number): void; + /** + * Remove DOM event handlers that match regex rules + * @param {RegExp[]} regexps regexps + * @example + * instance.unregisterEvents(/touch/, /key/); + */ + unregisterEvents(...regexps: RegExp[]): void; + /** + * Recover events that are unregistered. + * @param {RegExp[]} regexps regexps + */ + registerEvents(...regexps: RegExp[]): void; + /** + * Clear all movements and stop scrollbar immediately, will be useful when you want to stop scrollbar and set it to another position. + */ + clearMovement(): void; + /** + * Alias for clearMovement() method. + */ + stop(): void; + /** + * Remove this scrollbar instance + * @param {boolean} isRemoval Set to true if scrollbar being removed from DOM + */ + destroy(isRemoval?: boolean): void; + /** + * Get content element of the scrollbar, which contains all of your contents within scrollbar. + * In other words, all contents that you've put them into target element, will be moved here after you initialized the scrollbar. + * @return {HTMLElement} HTML content element + */ + getContentElem(): HTMLElement; + /** + * Show scrollbar track, you can choose whether 'x' or 'y' or 'both', default is 'both' which will show tracks both on x-axis and y-axis. + * @param {"x"|"y"|"both"} direction Track direction + */ + showTrack(direction?: "x" | "y" | "both"): void; + /** + * Like showTrack() method, but for hiding the track on specified direction. + * @param {"x"|"y"|"both"} direction Track direction + */ + hideTrack(direction?: "x" | "y" | "both"): void; +} diff --git a/smooth-scrollbar/smooth-scrollbar-tests.ts b/smooth-scrollbar/smooth-scrollbar-tests.ts new file mode 100644 index 0000000000..2072caa3c8 --- /dev/null +++ b/smooth-scrollbar/smooth-scrollbar-tests.ts @@ -0,0 +1,31 @@ +import Scrollbar from "smooth-scrollbar"; + +const elem = document.createElement("div"); + +const scrollbar = Scrollbar.init(elem, { + continuousScrolling: true, + damping: 5, + overscrollDamping: 5, + overscrollEffect: "glow", + overscrollEffectColor: "green", + renderByPixels: true, + speed: 10, + syncCallbacks: true, + thumbMinSize: 1 +}); + +Scrollbar.has(elem); +Scrollbar.get(elem) === scrollbar; + +scrollbar.targets.container; +scrollbar.targets.xAxis.track; + +scrollbar.update(true); +scrollbar.setPosition(10, 10); + +scrollbar.addListener(status => status.direction); +scrollbar.infiniteScroll(status => status.direction.y); + +scrollbar.hideTrack("both"); +scrollbar.showTrack("x"); +scrollbar.destroy(true); diff --git a/smooth-scrollbar/tsconfig.json b/smooth-scrollbar/tsconfig.json new file mode 100644 index 0000000000..be638b7a40 --- /dev/null +++ b/smooth-scrollbar/tsconfig.json @@ -0,0 +1,20 @@ +{ + "compilerOptions": { + "module": "commonjs", + "target": "es6", + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "smooth-scrollbar-tests.ts" + ] +} diff --git a/smooth-scrollbar/tslint.json b/smooth-scrollbar/tslint.json new file mode 100644 index 0000000000..377cc837d4 --- /dev/null +++ b/smooth-scrollbar/tslint.json @@ -0,0 +1 @@ +{ "extends": "../tslint.json" } From 4c2595cf698b2ba92fe6b42dd1068462fbe2df99 Mon Sep 17 00:00:00 2001 From: Alexey Svetliakov Date: Tue, 10 Jan 2017 06:24:01 +0100 Subject: [PATCH 040/100] initial commit --- react-smooth-scrollbar/index.d.ts | 40 +++++++++++++++++++ .../react-smooth-scrollbar-tests.tsx | 19 +++++++++ react-smooth-scrollbar/tsconfig.json | 21 ++++++++++ react-smooth-scrollbar/tslint.json | 1 + 4 files changed, 81 insertions(+) create mode 100644 react-smooth-scrollbar/index.d.ts create mode 100644 react-smooth-scrollbar/react-smooth-scrollbar-tests.tsx create mode 100644 react-smooth-scrollbar/tsconfig.json create mode 100644 react-smooth-scrollbar/tslint.json diff --git a/react-smooth-scrollbar/index.d.ts b/react-smooth-scrollbar/index.d.ts new file mode 100644 index 0000000000..3c4d541294 --- /dev/null +++ b/react-smooth-scrollbar/index.d.ts @@ -0,0 +1,40 @@ +// Type definitions for react-smooth-scrollbar 7.2 +// Project: https://github.com/idiotWu/react-smooth-scrollbar +// Definitions by: Alexey Svetliakov +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +import * as React from "react"; +import SmoothScrollbar, { ScrollbarOptions, ScrollStatusObject } from "smooth-scrollbar"; + +declare namespace Scrollbar { + interface ScrollbarProps extends ScrollbarOptions { + /** + * Pipe to scrollbar.addListener() + */ + onScroll?: (status: ScrollStatusObject, scrollbarInstance: SmoothScrollbar) => void; + /** + * Keep scrollbar tracks visible whether it's scrolling or not + * @default false + */ + alwaysShowTracks?: boolean; + /** + * Optional class name + */ + className?: string; + /** + * Optional style + */ + style?: React.CSSProperties; + } +} + +declare class Scrollbar extends React.Component { + /** + * Scrollbar instance + */ + public readonly scrollbar: SmoothScrollbar; + +} + +export as namespace Scrollbar; +export = Scrollbar; diff --git a/react-smooth-scrollbar/react-smooth-scrollbar-tests.tsx b/react-smooth-scrollbar/react-smooth-scrollbar-tests.tsx new file mode 100644 index 0000000000..f46efe0e62 --- /dev/null +++ b/react-smooth-scrollbar/react-smooth-scrollbar-tests.tsx @@ -0,0 +1,19 @@ +import * as React from "react"; +import * as SmoothScrollbar from "react-smooth-scrollbar"; + + { } } />; +; + +class Test extends React.Component { + public ref: SmoothScrollbar; + + public componentDidMount() { + this.ref.scrollbar.scrollTo(0, 500); + } + + public render() { + return ( + this.ref = ref} /> + ); + } +} diff --git a/react-smooth-scrollbar/tsconfig.json b/react-smooth-scrollbar/tsconfig.json new file mode 100644 index 0000000000..aef8e9bced --- /dev/null +++ b/react-smooth-scrollbar/tsconfig.json @@ -0,0 +1,21 @@ +{ + "compilerOptions": { + "module": "commonjs", + "target": "es6", + "jsx": "react", + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "react-smooth-scrollbar-tests.tsx" + ] +} diff --git a/react-smooth-scrollbar/tslint.json b/react-smooth-scrollbar/tslint.json new file mode 100644 index 0000000000..377cc837d4 --- /dev/null +++ b/react-smooth-scrollbar/tslint.json @@ -0,0 +1 @@ +{ "extends": "../tslint.json" } From 1cd1a67d9221cbe3547ae5a4efa4ee336943e845 Mon Sep 17 00:00:00 2001 From: Alexey Svetliakov Date: Tue, 10 Jan 2017 06:26:24 +0100 Subject: [PATCH 041/100] Remove unnecessary public identifiers --- react-smooth-scrollbar/index.d.ts | 2 +- react-smooth-scrollbar/react-smooth-scrollbar-tests.tsx | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/react-smooth-scrollbar/index.d.ts b/react-smooth-scrollbar/index.d.ts index 3c4d541294..df5746f9d4 100644 --- a/react-smooth-scrollbar/index.d.ts +++ b/react-smooth-scrollbar/index.d.ts @@ -32,7 +32,7 @@ declare class Scrollbar extends React.Component { /** * Scrollbar instance */ - public readonly scrollbar: SmoothScrollbar; + readonly scrollbar: SmoothScrollbar; } diff --git a/react-smooth-scrollbar/react-smooth-scrollbar-tests.tsx b/react-smooth-scrollbar/react-smooth-scrollbar-tests.tsx index f46efe0e62..956df59f9c 100644 --- a/react-smooth-scrollbar/react-smooth-scrollbar-tests.tsx +++ b/react-smooth-scrollbar/react-smooth-scrollbar-tests.tsx @@ -5,13 +5,13 @@ import * as SmoothScrollbar from "react-smooth-scrollbar"; ; class Test extends React.Component { - public ref: SmoothScrollbar; + ref: SmoothScrollbar; - public componentDidMount() { + componentDidMount() { this.ref.scrollbar.scrollTo(0, 500); } - public render() { + render() { return ( this.ref = ref} /> ); From 1bb87209613b649c60c7788c89c3bedbb8d42afc Mon Sep 17 00:00:00 2001 From: Alexey Svetliakov Date: Tue, 10 Jan 2017 06:27:37 +0100 Subject: [PATCH 042/100] Linting --- smooth-scrollbar/index.d.ts | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/smooth-scrollbar/index.d.ts b/smooth-scrollbar/index.d.ts index 7962a4f9ee..f6a65ca958 100644 --- a/smooth-scrollbar/index.d.ts +++ b/smooth-scrollbar/index.d.ts @@ -65,7 +65,7 @@ export interface ScrollbarTargets { readonly yAxis: { readonly track: HTMLElement; readonly thumb: HTMLElement; - } + }; } interface ScrollIntoViewOptions { @@ -153,41 +153,41 @@ export default class Scrollbar { /** * Current scrollbar targets */ - public readonly targets: ScrollbarTargets; + readonly targets: ScrollbarTargets; /** * Current scrolling offset */ - public offset: { + offset: { x: number; y: number; }; /** * Max scrolling offset */ - public limit: { + limit: { x: number; y: number; - } + }; /** * Alias for offset.y */ - public scrollTop: number; + scrollTop: number; /** * Alias for offset.x */ - public scrollLeft: number; + scrollLeft: number; /** * Scrollbars are automatically updated with 100ms debounce (or childList changes if MutationObserver is supported). * You can call update() to force an update, this will be useful when you modified contents inside scrollbar * @param {boolean} async By default, updating will operate synchronously, set to true to update asynchronously (in next frame). */ - public update(async?: boolean): void; + update(async?: boolean): void; /** * Return the size of scrollbar container and scroll content * @return {Object} Container and content dimensions */ - public getSize(): { container: { width: number; height: number }; content: { width: number; height: number } }; + getSize(): { container: { width: number; height: number }; content: { width: number; height: number } }; /** * Like window.scrollTo(), scroll content will be set to the given position immediately. * @param {number} x X position From 0e2ece89a47c5a6dc2a40bbb9f9c3a9c0f192279 Mon Sep 17 00:00:00 2001 From: Andy Hanson Date: Tue, 10 Jan 2017 06:27:28 -0800 Subject: [PATCH 043/100] chart.js: Fix spelling of "afterFooter" --- chart.js/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chart.js/index.d.ts b/chart.js/index.d.ts index 3ef5919acf..7a7b05c714 100644 --- a/chart.js/index.d.ts +++ b/chart.js/index.d.ts @@ -62,7 +62,7 @@ declare namespace Chart { afterBody?: (item?: ChartTooltipItem[], data?: any) => void; beforeFooter?: (item?: ChartTooltipItem[], data?: any) => void; footer?: (item?: ChartTooltipItem[], data?: any) => void; - afterfooter?: (item?: ChartTooltipItem[], data?: any) => void; + afterFooter?: (item?: ChartTooltipItem[], data?: any) => void; } export interface ChartAnimationParameter { From a13492cbe3d9325dfb4fb62d9ec190ea7264e591 Mon Sep 17 00:00:00 2001 From: Andy Date: Tue, 10 Jan 2017 06:29:13 -0800 Subject: [PATCH 044/100] Update comment on TS2.1 (#13883) --- README.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 0b1a79ae7c..5df5808bd1 100644 --- a/README.md +++ b/README.md @@ -206,7 +206,7 @@ Here are the [currently requested definitions](https://github.com/DefinitelyType If types are part of a web standard, they should be contributed to [TSJS-lib-generator](https://github.com/Microsoft/TSJS-lib-generator) so that they can become part of the default `lib.dom.d.ts`. -### A package uses `export =`, but I prefer to use default imports. Can I change `export =` to `export default`? +#### A package uses `export =`, but I prefer to use default imports. Can I change `export =` to `export default`? If default imports work in your environment, consider turning on the [`--allowSyntheticDefaultImports`](http://www.typescriptlang.org/docs/handbook/compiler-options.html) compiler option. Do not change the type definition if it is accurate. @@ -214,8 +214,7 @@ For an NPM package, `export =` is accurate if `node -p 'require("foo")'` is the #### I want to use features from TypeScript 2.1. -Then you will have to add a comment to your definition header: `// TypeScript Version: 2.1`. -If it is merged before January 7, it will be published as a prerelease version, such as `4.3.0-next.0`. +Then you will have to add a comment to the last line of your definition header (after `// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped`): `// TypeScript Version: 2.1`. #### I want to add a DOM API not present in TypeScript by default. From 76a710cc945a34dcf664ded78937c9b957b3eccd Mon Sep 17 00:00:00 2001 From: Andy Date: Tue, 10 Jan 2017 06:33:06 -0800 Subject: [PATCH 045/100] Rename test files to be consistent (#13882) --- .../ace-anchor-tests.ts => test/anchor.ts} | 0 .../background_tokenizer.ts} | 0 .../ace-default-tests.ts => test/default.ts} | 0 .../document.ts} | 0 .../edit_session.ts} | 0 .../ace-editor1-tests.ts => test/editor1.ts} | 0 .../editor_highlight_selected_word.ts} | 0 .../editor_navigation.ts} | 0 .../editor_text_edit.ts} | 0 .../multi_select.ts} | 0 .../placeholder.ts} | 0 .../ace-range-tests.ts => test/range.ts} | 0 .../range_list.ts} | 0 .../ace-search-tests.ts => test/search.ts} | 0 .../selection.ts} | 0 .../token_iterator.ts} | 0 .../virtual_renderer.ts} | 0 ace/tsconfig.json | 34 +- acl/{acl-tests.ts => test/index.ts} | 0 .../mongodbBackend.ts} | 0 .../redisBackend.ts} | 0 acl/tsconfig.json | 6 +- .../angular.ts} | 0 adal/{adal-tests.ts => test/index.ts} | 0 adal/tsconfig.json | 4 +- .../{amplifyjs-tests.ts => amplify-tests.ts} | 0 amplify/tsconfig.json | 2 +- ...-tests.ts => angular-localforage-tests.ts} | 0 angular-localforage/tsconfig.json | 2 +- ...ests.ts => angular-media-queries-tests.ts} | 0 angular-media-queries/tsconfig.json | 2 +- ...-tests.ts => angularlocalstorage-tests.ts} | 0 angularlocalstorage/tsconfig.json | 2 +- .../{index-tests.ts => array-uniq-tests.ts} | 0 array-uniq/tsconfig.json | 2 +- .../explicit.ts} | 0 async/{async-tests.ts => test/index.ts} | 0 async/tsconfig.json | 4 +- ...uth0.lock-tests.ts => auth0-lock-tests.ts} | 0 auth0-lock/tsconfig.json | 2 +- ... => azure-mobile-services-client-tests.ts} | 0 azure-mobile-services-client/tsconfig.json | 2 +- .../{babylon-tests.ts => babylonjs-tests.ts} | 0 babylonjs/tsconfig.json | 2 +- ...-tests.ts => backbone.marionette-tests.ts} | 0 backbone.marionette/tsconfig.json | 2 +- backbone/backbone-with-lodash-tests.ts | 404 ------------------ backbone/tsconfig.json | 3 +- .../{bounce-tests.ts => bounce.js-tests.ts} | 0 bounce.js/tsconfig.json | 2 +- bowser/bowser-module-tests.ts | 9 - ...bowser-global-tests.ts => bowser-tests.ts} | 0 bowser/tsconfig.json | 3 +- box2d/{box2dweb-tests.ts => box2d-tests.ts} | 0 box2d/tsconfig.json | 2 +- chartjs/{chart-tests.ts => chartjs-tests.ts} | 0 chartjs/tsconfig.json | 2 +- .../chrome-app.ts} | 0 chrome/{chrome-tests.ts => test/index.ts} | 0 chrome/tsconfig.json | 4 +- .../{cldr.js-event-tests.ts => test/event.ts} | 2 - cldrjs/{cldr.js-tests.ts => test/index.ts} | 0 .../supplemental.ts} | 0 cldrjs/tsconfig.json | 6 +- .../{codemirror-tests.ts => test/index.ts} | 0 .../matchbrackets.ts} | 0 .../runmode.ts} | 0 .../searchcursor.ts} | 0 .../showhint.ts} | 0 codemirror/tsconfig.json | 10 +- ...s-md5-tests.ts => cybozulabs-md5-tests.ts} | 0 cybozulabs-md5/tsconfig.json | 2 +- ...ormat-tests.ts => date.format.js-tests.ts} | 0 date.format.js/tsconfig.json | 2 +- ...eployJava-tests.ts => deployjava-tests.ts} | 0 deployjava/tsconfig.json | 2 +- ...ocCookies-tests.ts => doccookies-tests.ts} | 0 doccookies/tsconfig.json | 2 +- electron/{electron-tests.ts => test/index.ts} | 0 .../main.ts} | 0 .../renderer.ts} | 0 electron/tsconfig.json | 6 +- .../index.ts} | 0 .../{lib/lib-tests.ts => test/lib.ts} | 0 enhanced-resolve/tsconfig.json | 6 +- fabric/{fabricjs-tests.ts => fabric-tests.ts} | 0 fabric/tsconfig.json | 2 +- .../browser.ts} | 0 falcor/{falcor-tests.ts => test/index.ts} | 0 falcor/tsconfig.json | 4 +- fb/{fbsdk-tests.ts => fb-tests.ts} | 0 fb/tsconfig.json | 2 +- ffi/{node-ffi-tests.ts => ffi-tests.ts} | 0 ffi/tsconfig.json | 2 +- ...FileSaver-tests.ts => file-saver-tests.ts} | 0 file-saver/tsconfig.json | 2 +- finch/{Finch-tests.ts => finch-tests.ts} | 0 finch/tsconfig.json | 2 +- ...rprint-tests.ts => fingerprintjs-tests.ts} | 0 fingerprintjs/tsconfig.json | 2 +- firebase/{firebase-tests.ts => test/index.ts} | 0 .../simplelogin.ts} | 0 firebase/tsconfig.json | 4 +- ...lexSlider-tests.ts => flexslider-tests.ts} | 0 flexslider/tsconfig.json | 2 +- .../index.ts} | 0 .../safe.ts} | 0 format-unicorn/tsconfig.json | 4 +- ...alendar-tests.ts => fullcalendar-tests.ts} | 0 fullcalendar/tsconfig.json | 2 +- ...alendar-tests.ts => fullcalendar-tests.ts} | 0 fullcalendar/v1/tsconfig.json | 2 +- .../{index-tests.ts => get-stdin-tests.ts} | 0 get-stdin/tsconfig.json | 2 +- git/{node-git-tests.ts => git-tests.ts} | 0 git/tsconfig.json | 2 +- go/{goJS-tests.ts => go-tests.ts} | 0 go/tsconfig.json | 2 +- ...{ga-tests.ts => google.analytics-tests.ts} | 0 google.analytics/tsconfig.json | 2 +- ...ests.ts => googlemaps.infobubble-tests.ts} | 0 googlemaps.infobubble/tsconfig.json | 2 +- ...ogle.maps-tests.ts => googlemaps-tests.ts} | 0 googlemaps/tsconfig.json | 2 +- grunt/{gruntjs-tests.ts => grunt-tests.ts} | 0 grunt/tsconfig.json | 2 +- .../clip-loader.tsx} | 0 .../fade-loader.tsx} | 0 .../pacman-loader.tsx} | 0 .../rotate-loader.tsx} | 0 halogen/tsconfig.json | 8 +- .../{heatmap-tests.ts => heatmap.js-tests.ts} | 0 heatmap.js/tsconfig.json | 2 +- .../{modules/boost-tests.ts => test/boost.ts} | 0 .../exporting-tests.ts => test/exporting.ts} | 0 .../{highstock-tests.ts => test/highstock.ts} | 0 .../{highcharts-tests.ts => test/index.ts} | 0 .../more.ts} | 0 .../no-data-to-display.ts} | 0 .../offline-exporting.ts} | 0 highcharts/tsconfig.json | 14 +- ...lightjs-tests.ts => highlight.js-tests.ts} | 0 highlight.js/tsconfig.json | 2 +- .../{history-tests.ts => history.js-tests.ts} | 0 history.js/tsconfig.json | 2 +- ...ot-pace-tests.ts => hubspot-pace-tests.ts} | 0 hubspot-pace/tsconfig.json | 2 +- i18n/{i18n-node-tests.ts => i18n-tests.ts} | 0 i18n/tsconfig.json | 2 +- ...interact-tests.ts => interact.js-tests.ts} | 0 interact.js/tsconfig.json | 2 +- ...{intercom-tests.ts => intercomjs-tests.ts} | 0 intercomjs/tsconfig.json | 2 +- ...ider-tests.ts => ion.rangeslider-tests.ts} | 0 ion.rangeslider/tsconfig.json | 10 +- ...ider-tests.ts => ion.rangeslider-tests.ts} | 0 ion.rangeslider/v1/tsconfig.json | 2 +- is/{is_js-tests.ts => is-tests.ts} | 0 is/tsconfig.json | 2 +- ix.js/{ix-tests.ts => test/index.ts} | 0 ix.js/{l2o-tests.ts => test/l2o.ts} | 2 - ix.js/tsconfig.json | 4 +- jee-jsf/{jsf-tests.ts => jee-jsf-tests.ts} | 0 jee-jsf/tsconfig.json | 2 +- jodata/{joData-tests.ts => jodata-tests.ts} | 0 jodata/tsconfig.json | 2 +- ...ockUI-tests.ts => jquery.blockui-tests.ts} | 0 jquery.blockui/tsconfig.json | 2 +- ...s.ts => jquery.clientsidelogging-tests.ts} | 0 jquery.clientsidelogging/tsconfig.json | 2 +- ...u-tests.ts => jquery.contextmenu-tests.ts} | 0 jquery.contextmenu/tsconfig.json | 2 +- ...-tests.ts => jquery.customselect-tests.ts} | 0 jquery.customselect/tsconfig.json | 2 +- ...es-tests.ts => jquery.datatables-tests.ts} | 0 jquery.datatables/tsconfig.json | 2 +- ...ster-tests.ts => jquery.gridster-tests.ts} | 0 jquery.gridster/tsconfig.json | 2 +- ...dal-tests.ts => jquery.leanmodal-tests.ts} | 0 jquery.leanmodal/tsconfig.json | 2 +- ...Bar-tests.ts => jquery.notifybar-tests.ts} | 0 jquery.notifybar/tsconfig.json | 2 +- ...sts.ts => jquery.pjax.falsandtru-tests.ts} | 0 jquery.pjax.falsandtru/tsconfig.json | 2 +- ...e-tests.ts => jquery.postmessage-tests.ts} | 0 jquery.postmessage/tsconfig.json | 2 +- ...wGrid-tests.ts => jquery.rowgrid-tests.ts} | 0 jquery.rowgrid/tsconfig.json | 2 +- ...llTo-tests.ts => jquery.scrollto-tests.ts} | 0 jquery.scrollto/tsconfig.json | 2 +- ...ts.ts => jquery.simplepagination-tests.ts} | 0 jquery.simplepagination/tsconfig.json | 2 +- ...fixtures-tests.ts => js-fixtures-tests.ts} | 0 js-fixtures/tsconfig.json | 2 +- js-md5/{md5-tests.ts => js-md5-tests.ts} | 0 js-md5/tsconfig.json | 2 +- .../knockout-tests.ts => test/index.ts} | 0 .../templatingBehaviors.ts} | 0 knockout/tsconfig.json | 4 +- .../{konami-tests.ts => konami.js-tests.ts} | 0 konami.js/tsconfig.json | 2 +- ...alForage-tests.ts => localforage-tests.ts} | 0 localforage/tsconfig.json | 2 +- ...ck-boot-test.ts => loopback-boot-tests.ts} | 0 loopback-boot/tsconfig.json | 2 +- .../{loopback-test.ts => loopback-tests.ts} | 0 loopback/tsconfig.json | 2 +- .../{makerjs-tests.ts => maker.js-tests.ts} | 0 maker.js/tsconfig.json | 2 +- ...andrill-tests.ts => mandrill-api-tests.ts} | 0 mandrill-api/tsconfig.json | 2 +- ...bar-tests.ts => mcustomscrollbar-tests.ts} | 0 mcustomscrollbar/tsconfig.json | 2 +- .../{memory-fs-tests.ts => test/index.ts} | 2 - memory-fs/{lib/join-tests.ts => test/join.ts} | 0 .../normalize-tests.ts => test/normalize.ts} | 0 memory-fs/tsconfig.json | 8 +- metric-suffix/metric-suffix-external-tests.ts | 22 - metric-suffix/tsconfig.json | 3 +- ....ajax-tests.ts => microsoft-ajax-tests.ts} | 0 microsoft-ajax/tsconfig.json | 2 +- .../global-bind.ts} | 0 .../{mousetrap-tests.ts => test/index.ts} | 0 mousetrap/tsconfig.json | 4 +- .../actionSheet.ts} | 0 .../app-version.ts} | 0 .../appAvailability.ts} | 0 ng-cordova/{badge-tests.ts => test/badge.ts} | 0 .../{camera-tests.ts => test/camera.ts} | 0 .../datepicker.ts} | 0 .../{device-tests.ts => test/device.ts} | 0 .../deviceMotion.ts} | 0 .../deviceOrientation.ts} | 0 .../{dialogs-tests.ts => test/dialogs.ts} | 0 .../emailComposer.ts} | 0 ng-cordova/{file-tests.ts => test/file.ts} | 0 .../fileTransfer.ts} | 0 .../geolocation.ts} | 0 .../{network-tests.ts => test/network.ts} | 0 ng-cordova/{toast-tests.ts => test/toast.ts} | 0 ng-cordova/tsconfig.json | 32 +- ...js-toaster-tests.ts => ngtoaster-tests.ts} | 0 ngtoaster/tsconfig.json | 2 +- novnc/{noVNC-tests.ts => novnc-tests.ts} | 0 novnc/tsconfig.json | 2 +- .../{numeraljs-tests.ts => numeral-tests.ts} | 0 numeral/tsconfig.json | 2 +- .../{node-webkit-tests.ts => nw.gui-tests.ts} | 0 nw.gui/tsconfig.json | 2 +- openui5/{ui5-tests.ts => openui5-tests.ts} | 0 openui5/tsconfig.json | 2 +- ...{parallel-tests.ts => paralleljs-tests.ts} | 0 paralleljs/tsconfig.json | 2 +- ...ests.ts => paypal-cordova-plugin-tests.ts} | 0 paypal-cordova-plugin/tsconfig.json | 2 +- .../{please-tests.ts => pleasejs-tests.ts} | 0 pleasejs/tsconfig.json | 2 +- .../{popper-tests.ts => popper.js-tests.ts} | 0 popper.js/tsconfig.json | 2 +- pouchdb/{pouch-tests.ts => pouchdb-tests.ts} | 0 pouchdb/tsconfig.json | 2 +- prismjs/{prism-tests.ts => prismjs-tests.ts} | 0 prismjs/tsconfig.json | 2 +- ...{progress-tests.ts => progressjs-tests.ts} | 0 progressjs/tsconfig.json | 2 +- .../{PubSub-tests.ts => pubsub-js-tests.ts} | 0 pubsub-js/tsconfig.json | 2 +- ...js-ambient-tests.ts => random-js-tests.ts} | 0 random-js/tsconfig.json | 2 +- .../{ravenjs-tests.ts => raven-js-tests.ts} | 0 raven-js/tsconfig.json | 2 +- .../animated.tsx} | 0 .../index.tsx} | 0 react-native/tsconfig.json | 4 +- react/{react-tests.ts => test/index.ts} | 0 react/{react-tsx-tests.tsx => test/tsx.tsx} | 0 react/tsconfig.json | 4 +- ...y-tests.ts => requirejs-domready-tests.ts} | 0 requirejs-domready/tsconfig.json | 2 +- .../{require-tests.ts => requirejs-tests.ts} | 0 requirejs/tsconfig.json | 2 +- ...x.angular-tests.ts => rx-angular-tests.ts} | 0 rx-angular/tsconfig.json | 2 +- sammy/{sammyjs-tests.ts => sammy-tests.ts} | 0 sammy/tsconfig.json | 2 +- .../{chrome-tests.ts => test/chrome.ts} | 0 .../{firefox-tests.ts => test/firefox.ts} | 0 .../{index-tests.ts => test/index.ts} | 0 selenium-webdriver/tsconfig.json | 8 +- ...haTouch-tests.ts => sencha_touch-tests.ts} | 0 sencha_touch/tsconfig.json | 2 +- ...harePoint-tests.ts => sharepoint-tests.ts} | 0 sharepoint/tsconfig.json | 2 +- .../{js-signals-tests.ts => signals-tests.ts} | 0 signals/tsconfig.json | 2 +- .../{slickgrid-tests.ts => test/index.ts} | 0 .../slick.autotooltips.ts} | 0 .../slick.checkboxselectcolumn.ts} | 4 - slickgrid/tsconfig.json | 8 +- .../{sprintf-tests.ts => sprintf-js-tests.ts} | 0 sprintf-js/tsconfig.json | 2 +- svg.js/{svgjs-tests.ts => svg.js-tests.ts} | 0 svg.js/tsconfig.json | 2 +- ...h-event-tests.ts => touch-events-tests.ts} | 0 touch-events/tsconfig.json | 2 +- uuidjs/tsconfig.json | 2 +- uuidjs/{UUID-tests.ts => uuidjs-tests.ts} | 0 vex-js/tsconfig.json | 2 +- vex-js/{vex-tests.ts => vex-js-tests.ts} | 0 vivus/tsconfig.json | 2 +- vivus/{index-tests.ts => vivus-tests.ts} | 0 .../MediaStream.ts} | 1 - .../RTCPeerConnection.ts} | 3 - webrtc/tsconfig.json | 4 +- x2js/tsconfig.json | 2 +- x2js/{xml2json-tests.ts => x2js-tests.ts} | 0 316 files changed, 200 insertions(+), 652 deletions(-) rename ace/{tests/ace-anchor-tests.ts => test/anchor.ts} (100%) rename ace/{tests/ace-background_tokenizer-tests.ts => test/background_tokenizer.ts} (100%) rename ace/{tests/ace-default-tests.ts => test/default.ts} (100%) rename ace/{tests/ace-document-tests.ts => test/document.ts} (100%) rename ace/{tests/ace-edit_session-tests.ts => test/edit_session.ts} (100%) rename ace/{tests/ace-editor1-tests.ts => test/editor1.ts} (100%) rename ace/{tests/ace-editor_highlight_selected_word-tests.ts => test/editor_highlight_selected_word.ts} (100%) rename ace/{tests/ace-editor_navigation-tests.ts => test/editor_navigation.ts} (100%) rename ace/{tests/ace-editor_text_edit-tests.ts => test/editor_text_edit.ts} (100%) rename ace/{tests/ace-multi_select-tests.ts => test/multi_select.ts} (100%) rename ace/{tests/ace-placeholder-tests.ts => test/placeholder.ts} (100%) rename ace/{tests/ace-range-tests.ts => test/range.ts} (100%) rename ace/{tests/ace-range_list-tests.ts => test/range_list.ts} (100%) rename ace/{tests/ace-search-tests.ts => test/search.ts} (100%) rename ace/{tests/ace-selection-tests.ts => test/selection.ts} (100%) rename ace/{tests/ace-token_iterator-tests.ts => test/token_iterator.ts} (100%) rename ace/{tests/ace-virtual_renderer-tests.ts => test/virtual_renderer.ts} (100%) rename acl/{acl-tests.ts => test/index.ts} (100%) rename acl/{acl-mongodbBackend-tests.ts => test/mongodbBackend.ts} (100%) rename acl/{acl-redisBackend-tests.ts => test/redisBackend.ts} (100%) rename adal/{adal-angular-tests.ts => test/angular.ts} (100%) rename adal/{adal-tests.ts => test/index.ts} (100%) rename amplify/{amplifyjs-tests.ts => amplify-tests.ts} (100%) rename angular-localforage/{angular-localForage-tests.ts => angular-localforage-tests.ts} (100%) rename angular-media-queries/{match-media-tests.ts => angular-media-queries-tests.ts} (100%) rename angularlocalstorage/{angularLocalStorage-tests.ts => angularlocalstorage-tests.ts} (100%) rename array-uniq/{index-tests.ts => array-uniq-tests.ts} (100%) rename async/{async-explicit-tests.ts => test/explicit.ts} (100%) rename async/{async-tests.ts => test/index.ts} (100%) rename auth0-lock/{auth0.lock-tests.ts => auth0-lock-tests.ts} (100%) rename azure-mobile-services-client/{AzureMobileServicesClient-tests.ts => azure-mobile-services-client-tests.ts} (100%) rename babylonjs/{babylon-tests.ts => babylonjs-tests.ts} (100%) rename backbone.marionette/{marionette-tests.ts => backbone.marionette-tests.ts} (100%) delete mode 100644 backbone/backbone-with-lodash-tests.ts rename bounce.js/{bounce-tests.ts => bounce.js-tests.ts} (100%) delete mode 100644 bowser/bowser-module-tests.ts rename bowser/{bowser-global-tests.ts => bowser-tests.ts} (100%) rename box2d/{box2dweb-tests.ts => box2d-tests.ts} (100%) rename chartjs/{chart-tests.ts => chartjs-tests.ts} (100%) rename chrome/{chrome-app-tests.ts => test/chrome-app.ts} (100%) rename chrome/{chrome-tests.ts => test/index.ts} (100%) rename cldrjs/{cldr.js-event-tests.ts => test/event.ts} (93%) rename cldrjs/{cldr.js-tests.ts => test/index.ts} (100%) rename cldrjs/{cldr.js-supplemental-tests.ts => test/supplemental.ts} (100%) rename codemirror/{codemirror-tests.ts => test/index.ts} (100%) rename codemirror/{codemirror-matchbrackets-tests.ts => test/matchbrackets.ts} (100%) rename codemirror/{codemirror-runmode-tests.ts => test/runmode.ts} (100%) rename codemirror/{searchcursor-tests.ts => test/searchcursor.ts} (100%) rename codemirror/{codemirror-showhint-tests.ts => test/showhint.ts} (100%) rename cybozulabs-md5/{CybozuLabs-md5-tests.ts => cybozulabs-md5-tests.ts} (100%) rename date.format.js/{date.format-tests.ts => date.format.js-tests.ts} (100%) rename deployjava/{deployJava-tests.ts => deployjava-tests.ts} (100%) rename doccookies/{docCookies-tests.ts => doccookies-tests.ts} (100%) rename electron/{electron-tests.ts => test/index.ts} (100%) rename electron/{github-electron-main-tests.ts => test/main.ts} (100%) rename electron/{github-electron-renderer-tests.ts => test/renderer.ts} (100%) rename enhanced-resolve/{enhanced-resolve-tests.ts => test/index.ts} (100%) rename enhanced-resolve/{lib/lib-tests.ts => test/lib.ts} (100%) rename fabric/{fabricjs-tests.ts => fabric-tests.ts} (100%) rename falcor/{falcor-browser-tests.ts => test/browser.ts} (100%) rename falcor/{falcor-tests.ts => test/index.ts} (100%) rename fb/{fbsdk-tests.ts => fb-tests.ts} (100%) rename ffi/{node-ffi-tests.ts => ffi-tests.ts} (100%) rename file-saver/{FileSaver-tests.ts => file-saver-tests.ts} (100%) rename finch/{Finch-tests.ts => finch-tests.ts} (100%) rename fingerprintjs/{fingerprint-tests.ts => fingerprintjs-tests.ts} (100%) rename firebase/{firebase-tests.ts => test/index.ts} (100%) rename firebase/{firebase-simplelogin-tests.ts => test/simplelogin.ts} (100%) rename flexslider/{flexSlider-tests.ts => flexslider-tests.ts} (100%) rename format-unicorn/{format-unicorn-tests.ts => test/index.ts} (100%) rename format-unicorn/{format-unicorn-safe-tests.ts => test/safe.ts} (100%) rename fullcalendar/{fullCalendar-tests.ts => fullcalendar-tests.ts} (100%) rename fullcalendar/v1/{fullCalendar-tests.ts => fullcalendar-tests.ts} (100%) rename get-stdin/{index-tests.ts => get-stdin-tests.ts} (100%) rename git/{node-git-tests.ts => git-tests.ts} (100%) rename go/{goJS-tests.ts => go-tests.ts} (100%) rename google.analytics/{ga-tests.ts => google.analytics-tests.ts} (100%) rename googlemaps.infobubble/{google.maps.infobubble-tests.ts => googlemaps.infobubble-tests.ts} (100%) rename googlemaps/{google.maps-tests.ts => googlemaps-tests.ts} (100%) rename grunt/{gruntjs-tests.ts => grunt-tests.ts} (100%) rename halogen/{halogen-clip-loader-tests.tsx => test/clip-loader.tsx} (100%) rename halogen/{halogen-fade-loader-tests.tsx => test/fade-loader.tsx} (100%) rename halogen/{halogen-pacman-loader-tests.tsx => test/pacman-loader.tsx} (100%) rename halogen/{halogen-rotate-loader-tests.tsx => test/rotate-loader.tsx} (100%) rename heatmap.js/{heatmap-tests.ts => heatmap.js-tests.ts} (100%) rename highcharts/{modules/boost-tests.ts => test/boost.ts} (100%) rename highcharts/{modules/exporting-tests.ts => test/exporting.ts} (100%) rename highcharts/{highstock-tests.ts => test/highstock.ts} (100%) rename highcharts/{highcharts-tests.ts => test/index.ts} (100%) rename highcharts/{highcharts-more-tests.ts => test/more.ts} (100%) rename highcharts/{modules/no-data-to-display-tests.ts => test/no-data-to-display.ts} (100%) rename highcharts/{modules/offline-exporting-tests.ts => test/offline-exporting.ts} (100%) rename highlight.js/{highlightjs-tests.ts => highlight.js-tests.ts} (100%) rename history.js/{history-tests.ts => history.js-tests.ts} (100%) rename hubspot-pace/{HubSpot-pace-tests.ts => hubspot-pace-tests.ts} (100%) rename i18n/{i18n-node-tests.ts => i18n-tests.ts} (100%) rename interact.js/{interact-tests.ts => interact.js-tests.ts} (100%) rename intercomjs/{intercom-tests.ts => intercomjs-tests.ts} (100%) rename ion.rangeslider/{ion.rangeSlider-tests.ts => ion.rangeslider-tests.ts} (100%) rename ion.rangeslider/v1/{ion.rangeSlider-tests.ts => ion.rangeslider-tests.ts} (100%) rename is/{is_js-tests.ts => is-tests.ts} (100%) rename ix.js/{ix-tests.ts => test/index.ts} (100%) rename ix.js/{l2o-tests.ts => test/l2o.ts} (99%) rename jee-jsf/{jsf-tests.ts => jee-jsf-tests.ts} (100%) rename jodata/{joData-tests.ts => jodata-tests.ts} (100%) rename jquery.blockui/{jquery.blockUI-tests.ts => jquery.blockui-tests.ts} (100%) rename jquery.clientsidelogging/{jquery.clientSideLogging-tests.ts => jquery.clientsidelogging-tests.ts} (100%) rename jquery.contextmenu/{jquery.contextMenu-tests.ts => jquery.contextmenu-tests.ts} (100%) rename jquery.customselect/{jquery.customSelect-tests.ts => jquery.customselect-tests.ts} (100%) rename jquery.datatables/{jquery.dataTables-tests.ts => jquery.datatables-tests.ts} (100%) rename jquery.gridster/{gridster-tests.ts => jquery.gridster-tests.ts} (100%) rename jquery.leanmodal/{jquery.leanModal-tests.ts => jquery.leanmodal-tests.ts} (100%) rename jquery.notifybar/{jquery.notifyBar-tests.ts => jquery.notifybar-tests.ts} (100%) rename jquery.pjax.falsandtru/{jquery.pjax-tests.ts => jquery.pjax.falsandtru-tests.ts} (100%) rename jquery.postmessage/{jquery.postMessage-tests.ts => jquery.postmessage-tests.ts} (100%) rename jquery.rowgrid/{jquery.rowGrid-tests.ts => jquery.rowgrid-tests.ts} (100%) rename jquery.scrollto/{jquery.scrollTo-tests.ts => jquery.scrollto-tests.ts} (100%) rename jquery.simplepagination/{jquery.simplePagination-tests.ts => jquery.simplepagination-tests.ts} (100%) rename js-fixtures/{fixtures-tests.ts => js-fixtures-tests.ts} (100%) rename js-md5/{md5-tests.ts => js-md5-tests.ts} (100%) rename knockout/{tests/knockout-tests.ts => test/index.ts} (100%) rename knockout/{tests/knockout-templatingBehaviors-tests.ts => test/templatingBehaviors.ts} (100%) rename konami.js/{konami-tests.ts => konami.js-tests.ts} (100%) rename localforage/{localForage-tests.ts => localforage-tests.ts} (100%) rename loopback-boot/{loopback-boot-test.ts => loopback-boot-tests.ts} (100%) rename loopback/{loopback-test.ts => loopback-tests.ts} (100%) rename maker.js/{makerjs-tests.ts => maker.js-tests.ts} (100%) rename mandrill-api/{mandrill-tests.ts => mandrill-api-tests.ts} (100%) rename mcustomscrollbar/{mCustomScrollbar-tests.ts => mcustomscrollbar-tests.ts} (100%) rename memory-fs/{memory-fs-tests.ts => test/index.ts} (89%) rename memory-fs/{lib/join-tests.ts => test/join.ts} (100%) rename memory-fs/{lib/normalize-tests.ts => test/normalize.ts} (100%) delete mode 100644 metric-suffix/metric-suffix-external-tests.ts rename microsoft-ajax/{microsoft.ajax-tests.ts => microsoft-ajax-tests.ts} (100%) rename mousetrap/{mousetrap-global-bind-tests.ts => test/global-bind.ts} (100%) rename mousetrap/{mousetrap-tests.ts => test/index.ts} (100%) rename ng-cordova/{actionSheet-tests.ts => test/actionSheet.ts} (100%) rename ng-cordova/{app-version-tests.ts => test/app-version.ts} (100%) rename ng-cordova/{appAvailability-tests.ts => test/appAvailability.ts} (100%) rename ng-cordova/{badge-tests.ts => test/badge.ts} (100%) rename ng-cordova/{camera-tests.ts => test/camera.ts} (100%) rename ng-cordova/{datepicker-tests.ts => test/datepicker.ts} (100%) rename ng-cordova/{device-tests.ts => test/device.ts} (100%) rename ng-cordova/{deviceMotion-tests.ts => test/deviceMotion.ts} (100%) rename ng-cordova/{deviceOrientation-tests.ts => test/deviceOrientation.ts} (100%) rename ng-cordova/{dialogs-tests.ts => test/dialogs.ts} (100%) rename ng-cordova/{emailComposer-tests.ts => test/emailComposer.ts} (100%) rename ng-cordova/{file-tests.ts => test/file.ts} (100%) rename ng-cordova/{fileTransfer-tests.ts => test/fileTransfer.ts} (100%) rename ng-cordova/{geolocation-tests.ts => test/geolocation.ts} (100%) rename ng-cordova/{network-tests.ts => test/network.ts} (100%) rename ng-cordova/{toast-tests.ts => test/toast.ts} (100%) rename ngtoaster/{angularjs-toaster-tests.ts => ngtoaster-tests.ts} (100%) rename novnc/{noVNC-tests.ts => novnc-tests.ts} (100%) rename numeral/{numeraljs-tests.ts => numeral-tests.ts} (100%) rename nw.gui/{node-webkit-tests.ts => nw.gui-tests.ts} (100%) rename openui5/{ui5-tests.ts => openui5-tests.ts} (100%) rename paralleljs/{parallel-tests.ts => paralleljs-tests.ts} (100%) rename paypal-cordova-plugin/{PayPal-Cordova-Plugin-tests.ts => paypal-cordova-plugin-tests.ts} (100%) rename pleasejs/{please-tests.ts => pleasejs-tests.ts} (100%) rename popper.js/{popper-tests.ts => popper.js-tests.ts} (100%) rename pouchdb/{pouch-tests.ts => pouchdb-tests.ts} (100%) rename prismjs/{prism-tests.ts => prismjs-tests.ts} (100%) rename progressjs/{progress-tests.ts => progressjs-tests.ts} (100%) rename pubsub-js/{PubSub-tests.ts => pubsub-js-tests.ts} (100%) rename random-js/{random-js-ambient-tests.ts => random-js-tests.ts} (100%) rename raven-js/{ravenjs-tests.ts => raven-js-tests.ts} (100%) rename react-native/{react-native-animated-tests.tsx => test/animated.tsx} (100%) rename react-native/{react-native-tests.tsx => test/index.tsx} (100%) rename react/{react-tests.ts => test/index.ts} (100%) rename react/{react-tsx-tests.tsx => test/tsx.tsx} (100%) rename requirejs-domready/{domready-tests.ts => requirejs-domready-tests.ts} (100%) rename requirejs/{require-tests.ts => requirejs-tests.ts} (100%) rename rx-angular/{rx.angular-tests.ts => rx-angular-tests.ts} (100%) rename sammy/{sammyjs-tests.ts => sammy-tests.ts} (100%) rename selenium-webdriver/{chrome-tests.ts => test/chrome.ts} (100%) rename selenium-webdriver/{firefox-tests.ts => test/firefox.ts} (100%) rename selenium-webdriver/{index-tests.ts => test/index.ts} (100%) rename sencha_touch/{SenchaTouch-tests.ts => sencha_touch-tests.ts} (100%) rename sharepoint/{SharePoint-tests.ts => sharepoint-tests.ts} (100%) rename signals/{js-signals-tests.ts => signals-tests.ts} (100%) rename slickgrid/{slickgrid-tests.ts => test/index.ts} (100%) rename slickgrid/{slick.autotooltips-tests.ts => test/slick.autotooltips.ts} (100%) rename slickgrid/{slick.checkboxselectcolumn-tests.ts => test/slick.checkboxselectcolumn.ts} (89%) rename sprintf-js/{sprintf-tests.ts => sprintf-js-tests.ts} (100%) rename svg.js/{svgjs-tests.ts => svg.js-tests.ts} (100%) rename touch-events/{touch-event-tests.ts => touch-events-tests.ts} (100%) rename uuidjs/{UUID-tests.ts => uuidjs-tests.ts} (100%) rename vex-js/{vex-tests.ts => vex-js-tests.ts} (100%) rename vivus/{index-tests.ts => vivus-tests.ts} (100%) rename webrtc/{MediaStream-tests.ts => test/MediaStream.ts} (97%) rename webrtc/{RTCPeerConnection-tests.ts => test/RTCPeerConnection.ts} (97%) rename x2js/{xml2json-tests.ts => x2js-tests.ts} (100%) diff --git a/ace/tests/ace-anchor-tests.ts b/ace/test/anchor.ts similarity index 100% rename from ace/tests/ace-anchor-tests.ts rename to ace/test/anchor.ts diff --git a/ace/tests/ace-background_tokenizer-tests.ts b/ace/test/background_tokenizer.ts similarity index 100% rename from ace/tests/ace-background_tokenizer-tests.ts rename to ace/test/background_tokenizer.ts diff --git a/ace/tests/ace-default-tests.ts b/ace/test/default.ts similarity index 100% rename from ace/tests/ace-default-tests.ts rename to ace/test/default.ts diff --git a/ace/tests/ace-document-tests.ts b/ace/test/document.ts similarity index 100% rename from ace/tests/ace-document-tests.ts rename to ace/test/document.ts diff --git a/ace/tests/ace-edit_session-tests.ts b/ace/test/edit_session.ts similarity index 100% rename from ace/tests/ace-edit_session-tests.ts rename to ace/test/edit_session.ts diff --git a/ace/tests/ace-editor1-tests.ts b/ace/test/editor1.ts similarity index 100% rename from ace/tests/ace-editor1-tests.ts rename to ace/test/editor1.ts diff --git a/ace/tests/ace-editor_highlight_selected_word-tests.ts b/ace/test/editor_highlight_selected_word.ts similarity index 100% rename from ace/tests/ace-editor_highlight_selected_word-tests.ts rename to ace/test/editor_highlight_selected_word.ts diff --git a/ace/tests/ace-editor_navigation-tests.ts b/ace/test/editor_navigation.ts similarity index 100% rename from ace/tests/ace-editor_navigation-tests.ts rename to ace/test/editor_navigation.ts diff --git a/ace/tests/ace-editor_text_edit-tests.ts b/ace/test/editor_text_edit.ts similarity index 100% rename from ace/tests/ace-editor_text_edit-tests.ts rename to ace/test/editor_text_edit.ts diff --git a/ace/tests/ace-multi_select-tests.ts b/ace/test/multi_select.ts similarity index 100% rename from ace/tests/ace-multi_select-tests.ts rename to ace/test/multi_select.ts diff --git a/ace/tests/ace-placeholder-tests.ts b/ace/test/placeholder.ts similarity index 100% rename from ace/tests/ace-placeholder-tests.ts rename to ace/test/placeholder.ts diff --git a/ace/tests/ace-range-tests.ts b/ace/test/range.ts similarity index 100% rename from ace/tests/ace-range-tests.ts rename to ace/test/range.ts diff --git a/ace/tests/ace-range_list-tests.ts b/ace/test/range_list.ts similarity index 100% rename from ace/tests/ace-range_list-tests.ts rename to ace/test/range_list.ts diff --git a/ace/tests/ace-search-tests.ts b/ace/test/search.ts similarity index 100% rename from ace/tests/ace-search-tests.ts rename to ace/test/search.ts diff --git a/ace/tests/ace-selection-tests.ts b/ace/test/selection.ts similarity index 100% rename from ace/tests/ace-selection-tests.ts rename to ace/test/selection.ts diff --git a/ace/tests/ace-token_iterator-tests.ts b/ace/test/token_iterator.ts similarity index 100% rename from ace/tests/ace-token_iterator-tests.ts rename to ace/test/token_iterator.ts diff --git a/ace/tests/ace-virtual_renderer-tests.ts b/ace/test/virtual_renderer.ts similarity index 100% rename from ace/tests/ace-virtual_renderer-tests.ts rename to ace/test/virtual_renderer.ts diff --git a/ace/tsconfig.json b/ace/tsconfig.json index e5a0d270c3..0a65374983 100644 --- a/ace/tsconfig.json +++ b/ace/tsconfig.json @@ -15,22 +15,22 @@ }, "files": [ "index.d.ts", - "tests/ace-anchor-tests.ts", - "tests/ace-background_tokenizer-tests.ts", - "tests/ace-default-tests.ts", - "tests/ace-document-tests.ts", - "tests/ace-edit_session-tests.ts", - "tests/ace-editor1-tests.ts", - "tests/ace-editor_highlight_selected_word-tests.ts", - "tests/ace-editor_navigation-tests.ts", - "tests/ace-editor_text_edit-tests.ts", - "tests/ace-multi_select-tests.ts", - "tests/ace-placeholder-tests.ts", - "tests/ace-range-tests.ts", - "tests/ace-range_list-tests.ts", - "tests/ace-search-tests.ts", - "tests/ace-selection-tests.ts", - "tests/ace-token_iterator-tests.ts", - "tests/ace-virtual_renderer-tests.ts" + "test/anchor.ts", + "test/background_tokenizer.ts", + "test/default.ts", + "test/document.ts", + "test/edit_session.ts", + "test/editor1.ts", + "test/editor_highlight_selected_word.ts", + "test/editor_navigation.ts", + "test/editor_text_edit.ts", + "test/multi_select.ts", + "test/placeholder.ts", + "test/range.ts", + "test/range_list.ts", + "test/search.ts", + "test/selection.ts", + "test/token_iterator.ts", + "test/virtual_renderer.ts" ] } \ No newline at end of file diff --git a/acl/acl-tests.ts b/acl/test/index.ts similarity index 100% rename from acl/acl-tests.ts rename to acl/test/index.ts diff --git a/acl/acl-mongodbBackend-tests.ts b/acl/test/mongodbBackend.ts similarity index 100% rename from acl/acl-mongodbBackend-tests.ts rename to acl/test/mongodbBackend.ts diff --git a/acl/acl-redisBackend-tests.ts b/acl/test/redisBackend.ts similarity index 100% rename from acl/acl-redisBackend-tests.ts rename to acl/test/redisBackend.ts diff --git a/acl/tsconfig.json b/acl/tsconfig.json index d4ffafa7de..d663cdaa7f 100644 --- a/acl/tsconfig.json +++ b/acl/tsconfig.json @@ -15,8 +15,8 @@ }, "files": [ "index.d.ts", - "acl-tests.ts", - "acl-mongodbBackend-tests.ts", - "acl-redisBackend-tests.ts" + "test/index.ts", + "test/mongodbBackend.ts", + "test/redisBackend.ts" ] } \ No newline at end of file diff --git a/adal/adal-angular-tests.ts b/adal/test/angular.ts similarity index 100% rename from adal/adal-angular-tests.ts rename to adal/test/angular.ts diff --git a/adal/adal-tests.ts b/adal/test/index.ts similarity index 100% rename from adal/adal-tests.ts rename to adal/test/index.ts diff --git a/adal/tsconfig.json b/adal/tsconfig.json index e8a928a6ac..cabee4eec0 100644 --- a/adal/tsconfig.json +++ b/adal/tsconfig.json @@ -15,8 +15,8 @@ }, "files": [ "index.d.ts", - "adal-tests.ts", "adal-angular.d.ts", - "adal-angular-tests.ts" + "test/index.ts", + "test/angular.ts" ] } \ No newline at end of file diff --git a/amplify/amplifyjs-tests.ts b/amplify/amplify-tests.ts similarity index 100% rename from amplify/amplifyjs-tests.ts rename to amplify/amplify-tests.ts diff --git a/amplify/tsconfig.json b/amplify/tsconfig.json index 1adb36d073..a65fb478f3 100644 --- a/amplify/tsconfig.json +++ b/amplify/tsconfig.json @@ -15,6 +15,6 @@ }, "files": [ "index.d.ts", - "amplifyjs-tests.ts" + "amplify-tests.ts" ] } \ No newline at end of file diff --git a/angular-localforage/angular-localForage-tests.ts b/angular-localforage/angular-localforage-tests.ts similarity index 100% rename from angular-localforage/angular-localForage-tests.ts rename to angular-localforage/angular-localforage-tests.ts diff --git a/angular-localforage/tsconfig.json b/angular-localforage/tsconfig.json index e962f64de3..fd8c932b11 100644 --- a/angular-localforage/tsconfig.json +++ b/angular-localforage/tsconfig.json @@ -15,6 +15,6 @@ }, "files": [ "index.d.ts", - "angular-localForage-tests.ts" + "angular-localforage-tests.ts" ] } \ No newline at end of file diff --git a/angular-media-queries/match-media-tests.ts b/angular-media-queries/angular-media-queries-tests.ts similarity index 100% rename from angular-media-queries/match-media-tests.ts rename to angular-media-queries/angular-media-queries-tests.ts diff --git a/angular-media-queries/tsconfig.json b/angular-media-queries/tsconfig.json index df6257738e..493c273a2b 100644 --- a/angular-media-queries/tsconfig.json +++ b/angular-media-queries/tsconfig.json @@ -15,6 +15,6 @@ }, "files": [ "index.d.ts", - "match-media-tests.ts" + "angular-media-queries-tests.ts" ] } \ No newline at end of file diff --git a/angularlocalstorage/angularLocalStorage-tests.ts b/angularlocalstorage/angularlocalstorage-tests.ts similarity index 100% rename from angularlocalstorage/angularLocalStorage-tests.ts rename to angularlocalstorage/angularlocalstorage-tests.ts diff --git a/angularlocalstorage/tsconfig.json b/angularlocalstorage/tsconfig.json index ecdf8c2a96..cc91224c3b 100644 --- a/angularlocalstorage/tsconfig.json +++ b/angularlocalstorage/tsconfig.json @@ -15,6 +15,6 @@ }, "files": [ "index.d.ts", - "angularLocalStorage-tests.ts" + "angularlocalstorage-tests.ts" ] } \ No newline at end of file diff --git a/array-uniq/index-tests.ts b/array-uniq/array-uniq-tests.ts similarity index 100% rename from array-uniq/index-tests.ts rename to array-uniq/array-uniq-tests.ts diff --git a/array-uniq/tsconfig.json b/array-uniq/tsconfig.json index 3d8c032420..70196adde6 100644 --- a/array-uniq/tsconfig.json +++ b/array-uniq/tsconfig.json @@ -15,6 +15,6 @@ }, "files": [ "index.d.ts", - "index-tests.ts" + "array-uniq-tests.ts" ] } \ No newline at end of file diff --git a/async/async-explicit-tests.ts b/async/test/explicit.ts similarity index 100% rename from async/async-explicit-tests.ts rename to async/test/explicit.ts diff --git a/async/async-tests.ts b/async/test/index.ts similarity index 100% rename from async/async-tests.ts rename to async/test/index.ts diff --git a/async/tsconfig.json b/async/tsconfig.json index 412f9b97c6..8cceeb6576 100644 --- a/async/tsconfig.json +++ b/async/tsconfig.json @@ -15,7 +15,7 @@ }, "files": [ "index.d.ts", - "async-tests.ts", - "async-explicit-tests.ts" + "test/index.ts", + "test/explicit.ts" ] } \ No newline at end of file diff --git a/auth0-lock/auth0.lock-tests.ts b/auth0-lock/auth0-lock-tests.ts similarity index 100% rename from auth0-lock/auth0.lock-tests.ts rename to auth0-lock/auth0-lock-tests.ts diff --git a/auth0-lock/tsconfig.json b/auth0-lock/tsconfig.json index 641164d8a0..21b7642137 100644 --- a/auth0-lock/tsconfig.json +++ b/auth0-lock/tsconfig.json @@ -15,6 +15,6 @@ }, "files": [ "index.d.ts", - "auth0.lock-tests.ts" + "auth0-lock-tests.ts" ] } \ No newline at end of file diff --git a/azure-mobile-services-client/AzureMobileServicesClient-tests.ts b/azure-mobile-services-client/azure-mobile-services-client-tests.ts similarity index 100% rename from azure-mobile-services-client/AzureMobileServicesClient-tests.ts rename to azure-mobile-services-client/azure-mobile-services-client-tests.ts diff --git a/azure-mobile-services-client/tsconfig.json b/azure-mobile-services-client/tsconfig.json index 7ad1094d69..5037dc88a1 100644 --- a/azure-mobile-services-client/tsconfig.json +++ b/azure-mobile-services-client/tsconfig.json @@ -15,6 +15,6 @@ }, "files": [ "index.d.ts", - "AzureMobileServicesClient-tests.ts" + "azure-mobile-services-client-tests.ts" ] } \ No newline at end of file diff --git a/babylonjs/babylon-tests.ts b/babylonjs/babylonjs-tests.ts similarity index 100% rename from babylonjs/babylon-tests.ts rename to babylonjs/babylonjs-tests.ts diff --git a/babylonjs/tsconfig.json b/babylonjs/tsconfig.json index b7a13bc9fc..185e6fda44 100644 --- a/babylonjs/tsconfig.json +++ b/babylonjs/tsconfig.json @@ -15,6 +15,6 @@ }, "files": [ "index.d.ts", - "babylon-tests.ts" + "babylonjs-tests.ts" ] } \ No newline at end of file diff --git a/backbone.marionette/marionette-tests.ts b/backbone.marionette/backbone.marionette-tests.ts similarity index 100% rename from backbone.marionette/marionette-tests.ts rename to backbone.marionette/backbone.marionette-tests.ts diff --git a/backbone.marionette/tsconfig.json b/backbone.marionette/tsconfig.json index 6fc8f27360..9dbd0a28f9 100644 --- a/backbone.marionette/tsconfig.json +++ b/backbone.marionette/tsconfig.json @@ -15,6 +15,6 @@ }, "files": [ "index.d.ts", - "marionette-tests.ts" + "backbone.marionette-tests.ts" ] } \ No newline at end of file diff --git a/backbone/backbone-with-lodash-tests.ts b/backbone/backbone-with-lodash-tests.ts deleted file mode 100644 index b44b2be988..0000000000 --- a/backbone/backbone-with-lodash-tests.ts +++ /dev/null @@ -1,404 +0,0 @@ -import * as Backbone from "backbone"; -import * as _ from "lodash"; - -function test_events() { - - var object = new Backbone.Events(); - object.on("alert", (eventName: string) => alert("Triggered " + eventName)); - - object.trigger("alert", "an event"); - - var onChange = () => alert('whatever'); - var context: any; - - object.off("change", onChange); - object.off("change"); - object.off(null, onChange); - object.off(null, null, context); - object.off(); -} - -class SettingDefaults extends Backbone.Model { - - // 'defaults' could be set in one of the following ways: - - defaults() { - return { - name: "Joe" - } - } - - constructor(attributes?: any, options?: any) { - super(attributes, options); // TODO error TS17009: 'super' must be called before accessing 'this' in the constructor of a derived class. - this.defaults = { - name: "Joe" - } - // super has to come last - } - - // or set it like this - initialize() { - this.defaults = { - name: "Joe" - } - - } - - // same patterns could be used for setting 'Router.routes' and 'View.events' -} - -class Sidebar extends Backbone.Model { - - promptColor() { - var cssColor = prompt("Please enter a CSS color:"); - this.set({ color: cssColor }); - } -} - -class Note extends Backbone.Model { - initialize() { } - author() { } - coordinates() { } - allowedToEdit(account: any) { - return true; - } -} - -class PrivateNote extends Note { - allowedToEdit(account: any) { - return account.owns(this); - } - - set(attributes: any, options?: any): Backbone.Model { - return Backbone.Model.prototype.set.call(this, attributes, options); - } -} - -function test_models() { - - var sidebar = new Sidebar(); - sidebar.on('change:color', (model: {}, color: string) => $('#sidebar').css({ background: color })); - sidebar.set({ color: 'white' }); - sidebar.promptColor(); - - ////////// - - var note = new PrivateNote(); - - note.get("title"); - - note.set({ title: "March 20", content: "In his eyes she eclipses..." }); - - note.set("title", "A Scandal in Bohemia"); - - let strings: string[] - let value: any; - let values: any[]; - let bool: boolean; - - // underscore methods - strings = note.keys(); - values = note.values(); - values = note.pairs(); - values = note.invert(); - value = note.pick("foo"); - value = note.pick("foo", "bar"); - value = note.pick((value: any, key: any, object: any) => true); - value = note.omit("foo"); - value = note.omit("foo", "bar"); - value = note.omit((value: any, key: any, object: any) => true); - value = note.chain().pick().omit().value(); - bool = note.isEmpty(); -} - -class Employee extends Backbone.Model { - reports: EmployeeCollection; - - constructor(attributes?: any, options?: any) { - super(options); - this.reports = new EmployeeCollection(); - this.reports.url = '../api/employees/' + this.id + '/reports'; - } - - more() { - this.reports.reset(); - } -} - -class EmployeeCollection extends Backbone.Collection { - findByName(key: any) { } -} - -class Book extends Backbone.Model { - title: string; - author: string; - published: boolean; -} - -class Library extends Backbone.Collection { - // This model definition is here only to test type compatibility of the model, but it - // is not necessary in working code as it is automatically inferred through generics. - model: typeof Book; -} - -class Books extends Backbone.Collection { } - -function test_collection() { - - var books = new Books(); - - var book1: Book = new Book({ title: "Title 1", author: "Mike" }); - books.add(book1); - - // Objects can be added to collection by casting to model type. - // Compiler will check if object properties are valid for the cast. - // This gives better type checking than declaring an `any` overload. - books.add({ title: "Title 2", author: "Mikey" }); - - var model: Book = book1.collection.first(); - if (model !== book1) { - throw new Error("Error"); - } - - books.each(book => - book.get("title")); - - var titles = books.map(book => - book.get("title")); - - var publishedBooks = books.filter(book => - book.get("published") === true); - - var alphabetical = books.sortBy((book: Book): number => null); - - let one: Book; - let models: Book[]; - let bool: boolean; - let numDict: _.Dictionary; - let modelDict: _.Dictionary; - let modelsDict: _.Dictionary; - let num: number; - - models = books.slice(1); - models = books.slice(1, 3); - - // underscore methods - bool = books.all((value: Book, index: number, list: Book[]) => true); - bool = books.any((value: Book, index: number, list: Book[]) => true); - bool = books.chain().any((value: Book, index: number, list: Book[]) => true).value(); - models = books.collect((value: Book, index: number, list: Book[]) => value); - bool = books.contains(book1); - numDict = books.countBy((value: Book, index: number, list: Book[]) => true); - numDict = books.countBy("foo"); - one = books.detect((value: Book, index: number, list: Book[]) => true); - models = books.difference([book1]); - models = books.drop(); - models = books.each((value: Book, index: number, list: Book[]) => true); - bool = books.every((value: Book, index: number, list: Book[]) => true); - models = books.filter((value: Book, index: number, list: Book[]) => true); - one = books.find((value: Book, index: number, list: Book[]) => true); - num = books.findIndex((value: Book, index: number, list: Book[]) => true); - num = books.findLastIndex((value: Book, index: number, list: Book[]) => true); - one = books.first(); - models = books.first(3); - models = books.foldl((prev: Book[], curr: Book, index: number, list: Book[]) => prev, []); - models = books.foldr((prev: Book[], curr: Book, index: number, list: Book[]) => prev, []); - models = books.forEach((value: Book, index: number, list: Book[]) => true); - modelsDict = books.groupBy((value: Book, index: number, list: Book[]) => true); - modelsDict = books.groupBy("foo"); - one = books.head(); - models = books.head(3); - bool = books.include(book1); - bool = books.includes(book1); - modelDict = books.indexBy((value: Book, index: number, list: Book[]) => true); - modelDict = books.indexBy("foo"); - num = books.indexOf(book1, true); - one = books.initial(); - models = books.initial(3); - models = books.inject((prev: Book[], curr: Book, index: number, list: Book[]) => prev, []); - one = books.invoke("at", 3); - bool = books.isEmpty(); - one = books.last(); - models = books.last(3); - num = books.lastIndexOf(book1, 3); - models = books.map((value: Book, index: number, list: Book[]) => value); - one = books.max((value: Book, index: number, list: Book[]) => value); - one = books.min((value: Book, index: number, list: Book[]) => value); - [models] = books.partition((value: Book, index: number, list: Book[]) => true); - models = books.reduce((prev: Book[], curr: Book, index: number, list: Book[]) => prev, []); - models = books.reduceRight((prev: Book[], curr: Book, index: number, list: Book[]) => prev, []); - models = books.reject((value: Book, index: number, list: Book[]) => true); - models = books.rest(3); - one = books.sample(); - models = books.sample(3); - models = books.select((value: Book, index: number, list: Book[]) => true); - models = books.shuffle(); - num = books.size(); - bool = books.some((value: Book, index: number, list: Book[]) => true); - models = books.sortBy((value: Book, index: number, list: Book[]) => value); - models = books.sortBy("foo"); - models = books.tail(3); - one = books.take(); - models = books.take(3); - models = books.toArray(); - models = books.without(book1, book1); -} - -////////// - -Backbone.history.start(); - -namespace v1Changes { - namespace events { - function test_once() { - var model = new Employee; - model.once('invalid', () => { }, this); - model.once('invalid', () => { }); - } - - function test_listenTo() { - var model = new Employee; - var view = new Backbone.View(); - view.listenTo(model, 'invalid', () => { }); - } - - function test_listenToOnce() { - var model = new Employee; - var view = new Backbone.View(); - view.listenToOnce(model, 'invalid', () => { }); - } - - function test_stopListening() { - var model = new Employee; - var view = new Backbone.View(); - view.stopListening(model, 'invalid', () => { }); - view.stopListening(model, 'invalid'); - view.stopListening(model); - } - } - - namespace ModelAndCollection { - function test_url() { - Employee.prototype.url = () => '/employees'; - EmployeeCollection.prototype.url = () => '/employees'; - } - - function test_parse() { - var model = new Employee(); - model.parse('{}', {}); - var collection = new EmployeeCollection; - collection.parse('{}', {}); - } - - function test_toJSON() { - var model = new Employee(); - model.toJSON({}); - var collection = new EmployeeCollection; - collection.toJSON({}); - } - - function test_sync() { - var model = new Employee(); - model.sync(); - var collection = new EmployeeCollection; - collection.sync(); - } - } - - namespace Model { - function test_validationError() { - var model = new Employee; - if (model.validationError) { - console.log('has validation errors'); - } - } - - function test_fetch() { - var model = new Employee({ id: 1 }); - model.fetch({ - success: () => { }, - error: () => { } - }); - } - - function test_set() { - var model = new Employee; - model.set({ name: 'JoeDoe', age: 21 }, { validate: false }); - model.set('name', 'JoeDoes', { validate: false }); - } - - function test_destroy() { - var model = new Employee; - model.destroy({ - wait: true, - success: (m?, response?, options?) => { }, - error: (m?, jqxhr?, options?) => { } - }); - - model.destroy({ - success: (m?, response?, options?) => { }, - error: (m?, jqxhr?) => { } - }); - - model.destroy({ - success: () => { }, - error: (m?, jqxhr?) => { } - }); - } - - function test_save() { - var model = new Employee; - - model.save({ - name: 'Joe Doe', - age: 21 - }, - { - wait: true, - validate: false, - success: (m?, response?, options?) => { }, - error: (m?, jqxhr?, options?) => { } - }); - - model.save({ - name: 'Joe Doe', - age: 21 - }, - { - success: () => { }, - error: (m?, jqxhr?) => { } - }); - } - - function test_validate() { - var model = new Employee; - - model.validate({ name: 'JoeDoe', age: 21 }, { validateAge: false }) - } - } - - namespace Collection { - function test_fetch() { - var collection = new EmployeeCollection; - collection.fetch({ reset: true }); - } - - function test_create() { - var collection = new EmployeeCollection; - var model = new Employee; - - collection.create(model, { - validate: false - }); - } - } - - namespace Router { - function test_navigate() { - var router = new Backbone.Router; - - router.navigate('/employees', { trigger: true }); - router.navigate('/employees', true); - } - } -} diff --git a/backbone/tsconfig.json b/backbone/tsconfig.json index 43a64b9e25..b4a63b9ef0 100644 --- a/backbone/tsconfig.json +++ b/backbone/tsconfig.json @@ -15,7 +15,6 @@ }, "files": [ "index.d.ts", - "backbone-tests.ts", - "backbone-with-lodash-tests.ts" + "backbone-tests.ts" ] } \ No newline at end of file diff --git a/bounce.js/bounce-tests.ts b/bounce.js/bounce.js-tests.ts similarity index 100% rename from bounce.js/bounce-tests.ts rename to bounce.js/bounce.js-tests.ts diff --git a/bounce.js/tsconfig.json b/bounce.js/tsconfig.json index d06c697a6b..1718271ef6 100644 --- a/bounce.js/tsconfig.json +++ b/bounce.js/tsconfig.json @@ -15,6 +15,6 @@ }, "files": [ "index.d.ts", - "bounce-tests.ts" + "bounce.js-tests.ts" ] } \ No newline at end of file diff --git a/bowser/bowser-module-tests.ts b/bowser/bowser-module-tests.ts deleted file mode 100644 index 7d662b2f2b..0000000000 --- a/bowser/bowser-module-tests.ts +++ /dev/null @@ -1,9 +0,0 @@ - - -import Bowser = require('bowser'); - -Bowser.msedge === true; -Bowser.test(['msie']) === true; -Bowser.a === Bowser.c; -Bowser.osversion > 10; -Bowser.osversion === '10.1A'; \ No newline at end of file diff --git a/bowser/bowser-global-tests.ts b/bowser/bowser-tests.ts similarity index 100% rename from bowser/bowser-global-tests.ts rename to bowser/bowser-tests.ts diff --git a/bowser/tsconfig.json b/bowser/tsconfig.json index 60a6d8803f..70de6c837c 100644 --- a/bowser/tsconfig.json +++ b/bowser/tsconfig.json @@ -15,7 +15,6 @@ }, "files": [ "index.d.ts", - "bowser-module-tests.ts", - "bowser-global-tests.ts" + "bowser-tests.ts" ] } \ No newline at end of file diff --git a/box2d/box2dweb-tests.ts b/box2d/box2d-tests.ts similarity index 100% rename from box2d/box2dweb-tests.ts rename to box2d/box2d-tests.ts diff --git a/box2d/tsconfig.json b/box2d/tsconfig.json index 426500dcfd..d98f02a1c1 100644 --- a/box2d/tsconfig.json +++ b/box2d/tsconfig.json @@ -15,6 +15,6 @@ }, "files": [ "index.d.ts", - "box2dweb-tests.ts" + "box2d-tests.ts" ] } \ No newline at end of file diff --git a/chartjs/chart-tests.ts b/chartjs/chartjs-tests.ts similarity index 100% rename from chartjs/chart-tests.ts rename to chartjs/chartjs-tests.ts diff --git a/chartjs/tsconfig.json b/chartjs/tsconfig.json index 5d31ea6aa4..e6b3a63e91 100644 --- a/chartjs/tsconfig.json +++ b/chartjs/tsconfig.json @@ -15,6 +15,6 @@ }, "files": [ "index.d.ts", - "chart-tests.ts" + "chartjs-tests.ts" ] } \ No newline at end of file diff --git a/chrome/chrome-app-tests.ts b/chrome/test/chrome-app.ts similarity index 100% rename from chrome/chrome-app-tests.ts rename to chrome/test/chrome-app.ts diff --git a/chrome/chrome-tests.ts b/chrome/test/index.ts similarity index 100% rename from chrome/chrome-tests.ts rename to chrome/test/index.ts diff --git a/chrome/tsconfig.json b/chrome/tsconfig.json index 385e3c3ccf..33947734d9 100644 --- a/chrome/tsconfig.json +++ b/chrome/tsconfig.json @@ -16,8 +16,8 @@ "files": [ "index.d.ts", "chrome-app.d.ts", - "chrome-app-tests.ts", "chrome-cast.d.ts", - "chrome-tests.ts" + "test/index.ts", + "test/chrome-app.ts" ] } \ No newline at end of file diff --git a/cldrjs/cldr.js-event-tests.ts b/cldrjs/test/event.ts similarity index 93% rename from cldrjs/cldr.js-event-tests.ts rename to cldrjs/test/event.ts index c626e72663..92e8d51b77 100644 --- a/cldrjs/cldr.js-event-tests.ts +++ b/cldrjs/test/event.ts @@ -1,5 +1,3 @@ -/// - Cldr.on("get", (path, value) => { console.log(path); console.log(value); diff --git a/cldrjs/cldr.js-tests.ts b/cldrjs/test/index.ts similarity index 100% rename from cldrjs/cldr.js-tests.ts rename to cldrjs/test/index.ts diff --git a/cldrjs/cldr.js-supplemental-tests.ts b/cldrjs/test/supplemental.ts similarity index 100% rename from cldrjs/cldr.js-supplemental-tests.ts rename to cldrjs/test/supplemental.ts diff --git a/cldrjs/tsconfig.json b/cldrjs/tsconfig.json index f7edc6e510..2d2559c670 100644 --- a/cldrjs/tsconfig.json +++ b/cldrjs/tsconfig.json @@ -16,8 +16,8 @@ "files": [ "index.d.ts", "cldr.js-supplemental.d.ts", - "cldr.js-tests.ts", - "cldr.js-event-tests.ts", - "cldr.js-supplemental-tests.ts" + "test/index.ts", + "test/event.ts", + "test/supplemental.ts" ] } \ No newline at end of file diff --git a/codemirror/codemirror-tests.ts b/codemirror/test/index.ts similarity index 100% rename from codemirror/codemirror-tests.ts rename to codemirror/test/index.ts diff --git a/codemirror/codemirror-matchbrackets-tests.ts b/codemirror/test/matchbrackets.ts similarity index 100% rename from codemirror/codemirror-matchbrackets-tests.ts rename to codemirror/test/matchbrackets.ts diff --git a/codemirror/codemirror-runmode-tests.ts b/codemirror/test/runmode.ts similarity index 100% rename from codemirror/codemirror-runmode-tests.ts rename to codemirror/test/runmode.ts diff --git a/codemirror/searchcursor-tests.ts b/codemirror/test/searchcursor.ts similarity index 100% rename from codemirror/searchcursor-tests.ts rename to codemirror/test/searchcursor.ts diff --git a/codemirror/codemirror-showhint-tests.ts b/codemirror/test/showhint.ts similarity index 100% rename from codemirror/codemirror-showhint-tests.ts rename to codemirror/test/showhint.ts diff --git a/codemirror/tsconfig.json b/codemirror/tsconfig.json index 6b0d828cdc..01c0253447 100644 --- a/codemirror/tsconfig.json +++ b/codemirror/tsconfig.json @@ -15,14 +15,14 @@ }, "files": [ "index.d.ts", - "codemirror-tests.ts", "codemirror-matchbrackets.d.ts", - "codemirror-matchbrackets-tests.ts", "codemirror-runmode.d.ts", - "codemirror-runmode-tests.ts", "codemirror-showhint.d.ts", - "codemirror-showhint-tests.ts", "searchcursor.d.ts", - "searchcursor-tests.ts" + "test/index.ts", + "test/matchbrackets.ts", + "test/runmode.ts", + "test/searchcursor.ts", + "test/showhint.ts" ] } \ No newline at end of file diff --git a/cybozulabs-md5/CybozuLabs-md5-tests.ts b/cybozulabs-md5/cybozulabs-md5-tests.ts similarity index 100% rename from cybozulabs-md5/CybozuLabs-md5-tests.ts rename to cybozulabs-md5/cybozulabs-md5-tests.ts diff --git a/cybozulabs-md5/tsconfig.json b/cybozulabs-md5/tsconfig.json index 68a7e48345..37774f4c4e 100644 --- a/cybozulabs-md5/tsconfig.json +++ b/cybozulabs-md5/tsconfig.json @@ -15,6 +15,6 @@ }, "files": [ "index.d.ts", - "CybozuLabs-md5-tests.ts" + "cybozulabs-md5-tests.ts" ] } \ No newline at end of file diff --git a/date.format.js/date.format-tests.ts b/date.format.js/date.format.js-tests.ts similarity index 100% rename from date.format.js/date.format-tests.ts rename to date.format.js/date.format.js-tests.ts diff --git a/date.format.js/tsconfig.json b/date.format.js/tsconfig.json index ab30747450..794c0f0e15 100644 --- a/date.format.js/tsconfig.json +++ b/date.format.js/tsconfig.json @@ -15,6 +15,6 @@ }, "files": [ "index.d.ts", - "date.format-tests.ts" + "date.format.js-tests.ts" ] } \ No newline at end of file diff --git a/deployjava/deployJava-tests.ts b/deployjava/deployjava-tests.ts similarity index 100% rename from deployjava/deployJava-tests.ts rename to deployjava/deployjava-tests.ts diff --git a/deployjava/tsconfig.json b/deployjava/tsconfig.json index 5cf5fed9e5..ffd4d28173 100644 --- a/deployjava/tsconfig.json +++ b/deployjava/tsconfig.json @@ -15,6 +15,6 @@ }, "files": [ "index.d.ts", - "deployJava-tests.ts" + "deployjava-tests.ts" ] } \ No newline at end of file diff --git a/doccookies/docCookies-tests.ts b/doccookies/doccookies-tests.ts similarity index 100% rename from doccookies/docCookies-tests.ts rename to doccookies/doccookies-tests.ts diff --git a/doccookies/tsconfig.json b/doccookies/tsconfig.json index c6572494b3..ef167447be 100644 --- a/doccookies/tsconfig.json +++ b/doccookies/tsconfig.json @@ -15,6 +15,6 @@ }, "files": [ "index.d.ts", - "docCookies-tests.ts" + "doccookies-tests.ts" ] } \ No newline at end of file diff --git a/electron/electron-tests.ts b/electron/test/index.ts similarity index 100% rename from electron/electron-tests.ts rename to electron/test/index.ts diff --git a/electron/github-electron-main-tests.ts b/electron/test/main.ts similarity index 100% rename from electron/github-electron-main-tests.ts rename to electron/test/main.ts diff --git a/electron/github-electron-renderer-tests.ts b/electron/test/renderer.ts similarity index 100% rename from electron/github-electron-renderer-tests.ts rename to electron/test/renderer.ts diff --git a/electron/tsconfig.json b/electron/tsconfig.json index 79c504aade..8b0d4b6952 100644 --- a/electron/tsconfig.json +++ b/electron/tsconfig.json @@ -15,8 +15,8 @@ }, "files": [ "index.d.ts", - "electron-tests.ts", - "github-electron-renderer-tests.ts", - "github-electron-main-tests.ts" + "test/index.ts", + "test/main.ts", + "test/renderer.ts" ] } \ No newline at end of file diff --git a/enhanced-resolve/enhanced-resolve-tests.ts b/enhanced-resolve/test/index.ts similarity index 100% rename from enhanced-resolve/enhanced-resolve-tests.ts rename to enhanced-resolve/test/index.ts diff --git a/enhanced-resolve/lib/lib-tests.ts b/enhanced-resolve/test/lib.ts similarity index 100% rename from enhanced-resolve/lib/lib-tests.ts rename to enhanced-resolve/test/lib.ts diff --git a/enhanced-resolve/tsconfig.json b/enhanced-resolve/tsconfig.json index 5bd29396ab..b1a5b475ef 100644 --- a/enhanced-resolve/tsconfig.json +++ b/enhanced-resolve/tsconfig.json @@ -15,7 +15,6 @@ }, "files": [ "index.d.ts", - "enhanced-resolve-tests.ts", "lib/AliasFieldPlugin.d.ts", "lib/AliasPlugin.d.ts", "lib/AppendPlugin.d.ts", @@ -33,7 +32,6 @@ "lib/getPaths.d.ts", "lib/globToRegExp.d.ts", "lib/JoinRequestPlugin.d.ts", - "lib/lib-tests.ts", "lib/LogInfoPlugin.d.ts", "lib/MainFieldPlugin.d.ts", "lib/ModuleAppendPlugin.d.ts", @@ -49,6 +47,8 @@ "lib/SyncAsyncFileSystemDecorator.d.ts", "lib/TryNextPlugin.d.ts", "lib/UnsafeCachePlugin.d.ts", - "lib/UseFilePlugin.d.ts" + "lib/UseFilePlugin.d.ts", + "test/index.ts", + "test/lib.ts" ] } diff --git a/fabric/fabricjs-tests.ts b/fabric/fabric-tests.ts similarity index 100% rename from fabric/fabricjs-tests.ts rename to fabric/fabric-tests.ts diff --git a/fabric/tsconfig.json b/fabric/tsconfig.json index fe93e260b9..60921d5263 100644 --- a/fabric/tsconfig.json +++ b/fabric/tsconfig.json @@ -15,6 +15,6 @@ }, "files": [ "index.d.ts", - "fabricjs-tests.ts" + "fabric-tests.ts" ] } \ No newline at end of file diff --git a/falcor/falcor-browser-tests.ts b/falcor/test/browser.ts similarity index 100% rename from falcor/falcor-browser-tests.ts rename to falcor/test/browser.ts diff --git a/falcor/falcor-tests.ts b/falcor/test/index.ts similarity index 100% rename from falcor/falcor-tests.ts rename to falcor/test/index.ts diff --git a/falcor/tsconfig.json b/falcor/tsconfig.json index 1709a8a627..d81a60d4ee 100644 --- a/falcor/tsconfig.json +++ b/falcor/tsconfig.json @@ -15,7 +15,7 @@ }, "files": [ "index.d.ts", - "falcor-tests.ts", - "falcor-browser-tests.ts" + "test/index.ts", + "test/browser.ts" ] } \ No newline at end of file diff --git a/fb/fbsdk-tests.ts b/fb/fb-tests.ts similarity index 100% rename from fb/fbsdk-tests.ts rename to fb/fb-tests.ts diff --git a/fb/tsconfig.json b/fb/tsconfig.json index f99ae7bb46..a04f48e410 100644 --- a/fb/tsconfig.json +++ b/fb/tsconfig.json @@ -15,6 +15,6 @@ }, "files": [ "index.d.ts", - "fbsdk-tests.ts" + "fb-tests.ts" ] } \ No newline at end of file diff --git a/ffi/node-ffi-tests.ts b/ffi/ffi-tests.ts similarity index 100% rename from ffi/node-ffi-tests.ts rename to ffi/ffi-tests.ts diff --git a/ffi/tsconfig.json b/ffi/tsconfig.json index df00f708f8..45c991ece0 100644 --- a/ffi/tsconfig.json +++ b/ffi/tsconfig.json @@ -16,6 +16,6 @@ "files": [ "index.d.ts", "node-ffi-buffer.d.ts", - "node-ffi-tests.ts" + "ffi-tests.ts" ] } \ No newline at end of file diff --git a/file-saver/FileSaver-tests.ts b/file-saver/file-saver-tests.ts similarity index 100% rename from file-saver/FileSaver-tests.ts rename to file-saver/file-saver-tests.ts diff --git a/file-saver/tsconfig.json b/file-saver/tsconfig.json index 0ff18d9918..8aa772455a 100644 --- a/file-saver/tsconfig.json +++ b/file-saver/tsconfig.json @@ -15,6 +15,6 @@ }, "files": [ "index.d.ts", - "FileSaver-tests.ts" + "file-saver-tests.ts" ] } \ No newline at end of file diff --git a/finch/Finch-tests.ts b/finch/finch-tests.ts similarity index 100% rename from finch/Finch-tests.ts rename to finch/finch-tests.ts diff --git a/finch/tsconfig.json b/finch/tsconfig.json index 990f0265d9..1ffe7db57e 100644 --- a/finch/tsconfig.json +++ b/finch/tsconfig.json @@ -15,6 +15,6 @@ }, "files": [ "index.d.ts", - "Finch-tests.ts" + "finch-tests.ts" ] } \ No newline at end of file diff --git a/fingerprintjs/fingerprint-tests.ts b/fingerprintjs/fingerprintjs-tests.ts similarity index 100% rename from fingerprintjs/fingerprint-tests.ts rename to fingerprintjs/fingerprintjs-tests.ts diff --git a/fingerprintjs/tsconfig.json b/fingerprintjs/tsconfig.json index c1a7922d8f..146b0b572e 100644 --- a/fingerprintjs/tsconfig.json +++ b/fingerprintjs/tsconfig.json @@ -15,6 +15,6 @@ }, "files": [ "index.d.ts", - "fingerprint-tests.ts" + "fingerprintjs-tests.ts" ] } \ No newline at end of file diff --git a/firebase/firebase-tests.ts b/firebase/test/index.ts similarity index 100% rename from firebase/firebase-tests.ts rename to firebase/test/index.ts diff --git a/firebase/firebase-simplelogin-tests.ts b/firebase/test/simplelogin.ts similarity index 100% rename from firebase/firebase-simplelogin-tests.ts rename to firebase/test/simplelogin.ts diff --git a/firebase/tsconfig.json b/firebase/tsconfig.json index ead8399d7a..38c3bea3d5 100644 --- a/firebase/tsconfig.json +++ b/firebase/tsconfig.json @@ -16,7 +16,7 @@ "files": [ "index.d.ts", "firebase-simplelogin.d.ts", - "firebase-tests.ts", - "firebase-simplelogin-tests.ts" + "test/index.ts", + "test/simplelogin.ts" ] } \ No newline at end of file diff --git a/flexslider/flexSlider-tests.ts b/flexslider/flexslider-tests.ts similarity index 100% rename from flexslider/flexSlider-tests.ts rename to flexslider/flexslider-tests.ts diff --git a/flexslider/tsconfig.json b/flexslider/tsconfig.json index 2319b11528..e856d242c2 100644 --- a/flexslider/tsconfig.json +++ b/flexslider/tsconfig.json @@ -15,6 +15,6 @@ }, "files": [ "index.d.ts", - "flexSlider-tests.ts" + "flexslider-tests.ts" ] } \ No newline at end of file diff --git a/format-unicorn/format-unicorn-tests.ts b/format-unicorn/test/index.ts similarity index 100% rename from format-unicorn/format-unicorn-tests.ts rename to format-unicorn/test/index.ts diff --git a/format-unicorn/format-unicorn-safe-tests.ts b/format-unicorn/test/safe.ts similarity index 100% rename from format-unicorn/format-unicorn-safe-tests.ts rename to format-unicorn/test/safe.ts diff --git a/format-unicorn/tsconfig.json b/format-unicorn/tsconfig.json index 2c82afbd5b..45bb7c114e 100644 --- a/format-unicorn/tsconfig.json +++ b/format-unicorn/tsconfig.json @@ -16,7 +16,7 @@ "files": [ "index.d.ts", "safe.d.ts", - "format-unicorn-tests.ts", - "format-unicorn-safe-tests.ts" + "test/index.ts", + "test/safe.ts" ] } \ No newline at end of file diff --git a/fullcalendar/fullCalendar-tests.ts b/fullcalendar/fullcalendar-tests.ts similarity index 100% rename from fullcalendar/fullCalendar-tests.ts rename to fullcalendar/fullcalendar-tests.ts diff --git a/fullcalendar/tsconfig.json b/fullcalendar/tsconfig.json index b8ea18f909..2d26610a8c 100644 --- a/fullcalendar/tsconfig.json +++ b/fullcalendar/tsconfig.json @@ -15,6 +15,6 @@ }, "files": [ "index.d.ts", - "fullCalendar-tests.ts" + "fullcalendar-tests.ts" ] } \ No newline at end of file diff --git a/fullcalendar/v1/fullCalendar-tests.ts b/fullcalendar/v1/fullcalendar-tests.ts similarity index 100% rename from fullcalendar/v1/fullCalendar-tests.ts rename to fullcalendar/v1/fullcalendar-tests.ts diff --git a/fullcalendar/v1/tsconfig.json b/fullcalendar/v1/tsconfig.json index a589491226..bf820ac863 100644 --- a/fullcalendar/v1/tsconfig.json +++ b/fullcalendar/v1/tsconfig.json @@ -18,6 +18,6 @@ }, "files": [ "index.d.ts", - "fullCalendar-tests.ts" + "fullcalendar-tests.ts" ] } \ No newline at end of file diff --git a/get-stdin/index-tests.ts b/get-stdin/get-stdin-tests.ts similarity index 100% rename from get-stdin/index-tests.ts rename to get-stdin/get-stdin-tests.ts diff --git a/get-stdin/tsconfig.json b/get-stdin/tsconfig.json index 3d8c032420..2d3c1a6c70 100644 --- a/get-stdin/tsconfig.json +++ b/get-stdin/tsconfig.json @@ -15,6 +15,6 @@ }, "files": [ "index.d.ts", - "index-tests.ts" + "get-stdin-tests.ts" ] } \ No newline at end of file diff --git a/git/node-git-tests.ts b/git/git-tests.ts similarity index 100% rename from git/node-git-tests.ts rename to git/git-tests.ts diff --git a/git/tsconfig.json b/git/tsconfig.json index 0bc0ff5fe6..eccbc2065b 100644 --- a/git/tsconfig.json +++ b/git/tsconfig.json @@ -15,6 +15,6 @@ }, "files": [ "index.d.ts", - "node-git-tests.ts" + "git-tests.ts" ] } \ No newline at end of file diff --git a/go/goJS-tests.ts b/go/go-tests.ts similarity index 100% rename from go/goJS-tests.ts rename to go/go-tests.ts diff --git a/go/tsconfig.json b/go/tsconfig.json index ced78ef938..cd76eca117 100644 --- a/go/tsconfig.json +++ b/go/tsconfig.json @@ -15,6 +15,6 @@ }, "files": [ "index.d.ts", - "goJS-tests.ts" + "go-tests.ts" ] } \ No newline at end of file diff --git a/google.analytics/ga-tests.ts b/google.analytics/google.analytics-tests.ts similarity index 100% rename from google.analytics/ga-tests.ts rename to google.analytics/google.analytics-tests.ts diff --git a/google.analytics/tsconfig.json b/google.analytics/tsconfig.json index ddce77f25e..b954b6f821 100644 --- a/google.analytics/tsconfig.json +++ b/google.analytics/tsconfig.json @@ -15,6 +15,6 @@ }, "files": [ "index.d.ts", - "ga-tests.ts" + "google.analytics-tests.ts" ] } \ No newline at end of file diff --git a/googlemaps.infobubble/google.maps.infobubble-tests.ts b/googlemaps.infobubble/googlemaps.infobubble-tests.ts similarity index 100% rename from googlemaps.infobubble/google.maps.infobubble-tests.ts rename to googlemaps.infobubble/googlemaps.infobubble-tests.ts diff --git a/googlemaps.infobubble/tsconfig.json b/googlemaps.infobubble/tsconfig.json index 165f392587..42b03a0823 100644 --- a/googlemaps.infobubble/tsconfig.json +++ b/googlemaps.infobubble/tsconfig.json @@ -15,6 +15,6 @@ }, "files": [ "index.d.ts", - "google.maps.infobubble-tests.ts" + "googlemaps.infobubble-tests.ts" ] } \ No newline at end of file diff --git a/googlemaps/google.maps-tests.ts b/googlemaps/googlemaps-tests.ts similarity index 100% rename from googlemaps/google.maps-tests.ts rename to googlemaps/googlemaps-tests.ts diff --git a/googlemaps/tsconfig.json b/googlemaps/tsconfig.json index 0382e30210..c858dfee0c 100644 --- a/googlemaps/tsconfig.json +++ b/googlemaps/tsconfig.json @@ -15,6 +15,6 @@ }, "files": [ "index.d.ts", - "google.maps-tests.ts" + "googlemaps-tests.ts" ] } diff --git a/grunt/gruntjs-tests.ts b/grunt/grunt-tests.ts similarity index 100% rename from grunt/gruntjs-tests.ts rename to grunt/grunt-tests.ts diff --git a/grunt/tsconfig.json b/grunt/tsconfig.json index f4b2b816d9..ca11c8f477 100644 --- a/grunt/tsconfig.json +++ b/grunt/tsconfig.json @@ -15,6 +15,6 @@ }, "files": [ "index.d.ts", - "gruntjs-tests.ts" + "grunt-tests.ts" ] } \ No newline at end of file diff --git a/halogen/halogen-clip-loader-tests.tsx b/halogen/test/clip-loader.tsx similarity index 100% rename from halogen/halogen-clip-loader-tests.tsx rename to halogen/test/clip-loader.tsx diff --git a/halogen/halogen-fade-loader-tests.tsx b/halogen/test/fade-loader.tsx similarity index 100% rename from halogen/halogen-fade-loader-tests.tsx rename to halogen/test/fade-loader.tsx diff --git a/halogen/halogen-pacman-loader-tests.tsx b/halogen/test/pacman-loader.tsx similarity index 100% rename from halogen/halogen-pacman-loader-tests.tsx rename to halogen/test/pacman-loader.tsx diff --git a/halogen/halogen-rotate-loader-tests.tsx b/halogen/test/rotate-loader.tsx similarity index 100% rename from halogen/halogen-rotate-loader-tests.tsx rename to halogen/test/rotate-loader.tsx diff --git a/halogen/tsconfig.json b/halogen/tsconfig.json index 5e6c8ab8f5..c2c0018e1b 100644 --- a/halogen/tsconfig.json +++ b/halogen/tsconfig.json @@ -16,9 +16,9 @@ }, "files": [ "index.d.ts", - "halogen-clip-loader-tests.tsx", - "halogen-fade-loader-tests.tsx", - "halogen-pacman-loader-tests.tsx", - "halogen-rotate-loader-tests.tsx" + "test/clip-loader.tsx", + "test/fade-loader.tsx", + "test/pacman-loader.tsx", + "test/rotate-loader.tsx" ] } \ No newline at end of file diff --git a/heatmap.js/heatmap-tests.ts b/heatmap.js/heatmap.js-tests.ts similarity index 100% rename from heatmap.js/heatmap-tests.ts rename to heatmap.js/heatmap.js-tests.ts diff --git a/heatmap.js/tsconfig.json b/heatmap.js/tsconfig.json index b90279cd8c..e1b42b5bd1 100644 --- a/heatmap.js/tsconfig.json +++ b/heatmap.js/tsconfig.json @@ -12,6 +12,6 @@ }, "files": [ "index.d.ts", - "heatmap-tests.ts" + "heatmap.js-tests.ts" ] } \ No newline at end of file diff --git a/highcharts/modules/boost-tests.ts b/highcharts/test/boost.ts similarity index 100% rename from highcharts/modules/boost-tests.ts rename to highcharts/test/boost.ts diff --git a/highcharts/modules/exporting-tests.ts b/highcharts/test/exporting.ts similarity index 100% rename from highcharts/modules/exporting-tests.ts rename to highcharts/test/exporting.ts diff --git a/highcharts/highstock-tests.ts b/highcharts/test/highstock.ts similarity index 100% rename from highcharts/highstock-tests.ts rename to highcharts/test/highstock.ts diff --git a/highcharts/highcharts-tests.ts b/highcharts/test/index.ts similarity index 100% rename from highcharts/highcharts-tests.ts rename to highcharts/test/index.ts diff --git a/highcharts/highcharts-more-tests.ts b/highcharts/test/more.ts similarity index 100% rename from highcharts/highcharts-more-tests.ts rename to highcharts/test/more.ts diff --git a/highcharts/modules/no-data-to-display-tests.ts b/highcharts/test/no-data-to-display.ts similarity index 100% rename from highcharts/modules/no-data-to-display-tests.ts rename to highcharts/test/no-data-to-display.ts diff --git a/highcharts/modules/offline-exporting-tests.ts b/highcharts/test/offline-exporting.ts similarity index 100% rename from highcharts/modules/offline-exporting-tests.ts rename to highcharts/test/offline-exporting.ts diff --git a/highcharts/tsconfig.json b/highcharts/tsconfig.json index 4744c83cb0..5d3e9ebe3f 100644 --- a/highcharts/tsconfig.json +++ b/highcharts/tsconfig.json @@ -15,18 +15,18 @@ }, "files": [ "index.d.ts", - "highcharts-tests.ts", "modules/boost.d.ts", - "modules/boost-tests.ts", "modules/exporting.d.ts", - "modules/exporting-tests.ts", "modules/no-data-to-display.d.ts", - "modules/no-data-to-display-tests.ts", "modules/offline-exporting.d.ts", - "modules/offline-exporting-tests.ts", "highcharts-more.d.ts", - "highcharts-more-tests.ts", "highstock.d.ts", - "highstock-tests.ts" + "test/boost.ts", + "test/exporting.ts", + "test/highstock.ts", + "test/index.ts", + "test/more.ts", + "test/no-data-to-display.ts", + "test/offline-exporting.ts" ] } \ No newline at end of file diff --git a/highlight.js/highlightjs-tests.ts b/highlight.js/highlight.js-tests.ts similarity index 100% rename from highlight.js/highlightjs-tests.ts rename to highlight.js/highlight.js-tests.ts diff --git a/highlight.js/tsconfig.json b/highlight.js/tsconfig.json index 86f2eade00..4b7c3117e1 100644 --- a/highlight.js/tsconfig.json +++ b/highlight.js/tsconfig.json @@ -15,6 +15,6 @@ }, "files": [ "index.d.ts", - "highlightjs-tests.ts" + "highlight.js-tests.ts" ] } \ No newline at end of file diff --git a/history.js/history-tests.ts b/history.js/history.js-tests.ts similarity index 100% rename from history.js/history-tests.ts rename to history.js/history.js-tests.ts diff --git a/history.js/tsconfig.json b/history.js/tsconfig.json index 3ef4710368..795d9a540f 100644 --- a/history.js/tsconfig.json +++ b/history.js/tsconfig.json @@ -15,6 +15,6 @@ }, "files": [ "index.d.ts", - "history-tests.ts" + "history.js-tests.ts" ] } \ No newline at end of file diff --git a/hubspot-pace/HubSpot-pace-tests.ts b/hubspot-pace/hubspot-pace-tests.ts similarity index 100% rename from hubspot-pace/HubSpot-pace-tests.ts rename to hubspot-pace/hubspot-pace-tests.ts diff --git a/hubspot-pace/tsconfig.json b/hubspot-pace/tsconfig.json index 67b152117c..1f7464eaa2 100644 --- a/hubspot-pace/tsconfig.json +++ b/hubspot-pace/tsconfig.json @@ -15,6 +15,6 @@ }, "files": [ "index.d.ts", - "HubSpot-pace-tests.ts" + "hubspot-pace-tests.ts" ] } \ No newline at end of file diff --git a/i18n/i18n-node-tests.ts b/i18n/i18n-tests.ts similarity index 100% rename from i18n/i18n-node-tests.ts rename to i18n/i18n-tests.ts diff --git a/i18n/tsconfig.json b/i18n/tsconfig.json index 57a6b8ffb0..55f6a32871 100644 --- a/i18n/tsconfig.json +++ b/i18n/tsconfig.json @@ -15,6 +15,6 @@ }, "files": [ "index.d.ts", - "i18n-node-tests.ts" + "i18n-tests.ts" ] } \ No newline at end of file diff --git a/interact.js/interact-tests.ts b/interact.js/interact.js-tests.ts similarity index 100% rename from interact.js/interact-tests.ts rename to interact.js/interact.js-tests.ts diff --git a/interact.js/tsconfig.json b/interact.js/tsconfig.json index 9426c9e0cc..8dbabcade7 100644 --- a/interact.js/tsconfig.json +++ b/interact.js/tsconfig.json @@ -15,6 +15,6 @@ }, "files": [ "index.d.ts", - "interact-tests.ts" + "interact.js-tests.ts" ] } \ No newline at end of file diff --git a/intercomjs/intercom-tests.ts b/intercomjs/intercomjs-tests.ts similarity index 100% rename from intercomjs/intercom-tests.ts rename to intercomjs/intercomjs-tests.ts diff --git a/intercomjs/tsconfig.json b/intercomjs/tsconfig.json index 6dfa66b6a1..79163abfc4 100644 --- a/intercomjs/tsconfig.json +++ b/intercomjs/tsconfig.json @@ -15,6 +15,6 @@ }, "files": [ "index.d.ts", - "intercom-tests.ts" + "intercomjs-tests.ts" ] } \ No newline at end of file diff --git a/ion.rangeslider/ion.rangeSlider-tests.ts b/ion.rangeslider/ion.rangeslider-tests.ts similarity index 100% rename from ion.rangeslider/ion.rangeSlider-tests.ts rename to ion.rangeslider/ion.rangeslider-tests.ts diff --git a/ion.rangeslider/tsconfig.json b/ion.rangeslider/tsconfig.json index 5912868fde..aede38d763 100644 --- a/ion.rangeslider/tsconfig.json +++ b/ion.rangeslider/tsconfig.json @@ -1,8 +1,4 @@ { - "files": [ - "index.d.ts", - "ion.rangeSlider-tests.ts" - ], "compilerOptions": { "module": "commonjs", "target": "es6", @@ -16,5 +12,9 @@ "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true - } + }, + "files": [ + "index.d.ts", + "ion.rangeslider-tests.ts" + ] } \ No newline at end of file diff --git a/ion.rangeslider/v1/ion.rangeSlider-tests.ts b/ion.rangeslider/v1/ion.rangeslider-tests.ts similarity index 100% rename from ion.rangeslider/v1/ion.rangeSlider-tests.ts rename to ion.rangeslider/v1/ion.rangeslider-tests.ts diff --git a/ion.rangeslider/v1/tsconfig.json b/ion.rangeslider/v1/tsconfig.json index fa756621f2..7e3532f344 100644 --- a/ion.rangeslider/v1/tsconfig.json +++ b/ion.rangeslider/v1/tsconfig.json @@ -18,6 +18,6 @@ }, "files": [ "index.d.ts", - "ion.rangeSlider-tests.ts" + "ion.rangeslider-tests.ts" ] } \ No newline at end of file diff --git a/is/is_js-tests.ts b/is/is-tests.ts similarity index 100% rename from is/is_js-tests.ts rename to is/is-tests.ts diff --git a/is/tsconfig.json b/is/tsconfig.json index 2e97760d50..7afa0a2de1 100644 --- a/is/tsconfig.json +++ b/is/tsconfig.json @@ -15,6 +15,6 @@ }, "files": [ "index.d.ts", - "is_js-tests.ts" + "is-tests.ts" ] } \ No newline at end of file diff --git a/ix.js/ix-tests.ts b/ix.js/test/index.ts similarity index 100% rename from ix.js/ix-tests.ts rename to ix.js/test/index.ts diff --git a/ix.js/l2o-tests.ts b/ix.js/test/l2o.ts similarity index 99% rename from ix.js/l2o-tests.ts rename to ix.js/test/l2o.ts index 7b35b71a9e..063e85bfd6 100644 --- a/ix.js/l2o-tests.ts +++ b/ix.js/test/l2o.ts @@ -1,5 +1,3 @@ -/// - var ec_ns = (a: number, b: string) => a.toString() == b; //equality comparer on number,string var ec_nn = (a: number, b: number) => a === b; //equality comparer on number,number var c_nn = (a: number, b: number) => a - b; //comparer on number,number diff --git a/ix.js/tsconfig.json b/ix.js/tsconfig.json index 670dba223e..7f476db666 100644 --- a/ix.js/tsconfig.json +++ b/ix.js/tsconfig.json @@ -15,7 +15,7 @@ }, "files": [ "index.d.ts", - "ix-tests.ts", - "l2o-tests.ts" + "test/index.ts", + "test/l2o.ts" ] } \ No newline at end of file diff --git a/jee-jsf/jsf-tests.ts b/jee-jsf/jee-jsf-tests.ts similarity index 100% rename from jee-jsf/jsf-tests.ts rename to jee-jsf/jee-jsf-tests.ts diff --git a/jee-jsf/tsconfig.json b/jee-jsf/tsconfig.json index 0774f560ab..e7b8594556 100644 --- a/jee-jsf/tsconfig.json +++ b/jee-jsf/tsconfig.json @@ -15,6 +15,6 @@ }, "files": [ "index.d.ts", - "jsf-tests.ts" + "jee-jsf-tests.ts" ] } \ No newline at end of file diff --git a/jodata/joData-tests.ts b/jodata/jodata-tests.ts similarity index 100% rename from jodata/joData-tests.ts rename to jodata/jodata-tests.ts diff --git a/jodata/tsconfig.json b/jodata/tsconfig.json index 3638d1b6f6..28bcc5bb36 100644 --- a/jodata/tsconfig.json +++ b/jodata/tsconfig.json @@ -15,6 +15,6 @@ }, "files": [ "index.d.ts", - "joData-tests.ts" + "jodata-tests.ts" ] } \ No newline at end of file diff --git a/jquery.blockui/jquery.blockUI-tests.ts b/jquery.blockui/jquery.blockui-tests.ts similarity index 100% rename from jquery.blockui/jquery.blockUI-tests.ts rename to jquery.blockui/jquery.blockui-tests.ts diff --git a/jquery.blockui/tsconfig.json b/jquery.blockui/tsconfig.json index 0d9c7d0a03..70b0f9a8aa 100644 --- a/jquery.blockui/tsconfig.json +++ b/jquery.blockui/tsconfig.json @@ -15,6 +15,6 @@ }, "files": [ "index.d.ts", - "jquery.blockUI-tests.ts" + "jquery.blockui-tests.ts" ] } \ No newline at end of file diff --git a/jquery.clientsidelogging/jquery.clientSideLogging-tests.ts b/jquery.clientsidelogging/jquery.clientsidelogging-tests.ts similarity index 100% rename from jquery.clientsidelogging/jquery.clientSideLogging-tests.ts rename to jquery.clientsidelogging/jquery.clientsidelogging-tests.ts diff --git a/jquery.clientsidelogging/tsconfig.json b/jquery.clientsidelogging/tsconfig.json index 483ce592e1..0bfce0b33c 100644 --- a/jquery.clientsidelogging/tsconfig.json +++ b/jquery.clientsidelogging/tsconfig.json @@ -15,6 +15,6 @@ }, "files": [ "index.d.ts", - "jquery.clientSideLogging-tests.ts" + "jquery.clientsidelogging-tests.ts" ] } \ No newline at end of file diff --git a/jquery.contextmenu/jquery.contextMenu-tests.ts b/jquery.contextmenu/jquery.contextmenu-tests.ts similarity index 100% rename from jquery.contextmenu/jquery.contextMenu-tests.ts rename to jquery.contextmenu/jquery.contextmenu-tests.ts diff --git a/jquery.contextmenu/tsconfig.json b/jquery.contextmenu/tsconfig.json index 25cae340ac..4e684a80b0 100644 --- a/jquery.contextmenu/tsconfig.json +++ b/jquery.contextmenu/tsconfig.json @@ -15,6 +15,6 @@ }, "files": [ "index.d.ts", - "jquery.contextMenu-tests.ts" + "jquery.contextmenu-tests.ts" ] } \ No newline at end of file diff --git a/jquery.customselect/jquery.customSelect-tests.ts b/jquery.customselect/jquery.customselect-tests.ts similarity index 100% rename from jquery.customselect/jquery.customSelect-tests.ts rename to jquery.customselect/jquery.customselect-tests.ts diff --git a/jquery.customselect/tsconfig.json b/jquery.customselect/tsconfig.json index 470079177d..a82625409d 100644 --- a/jquery.customselect/tsconfig.json +++ b/jquery.customselect/tsconfig.json @@ -15,6 +15,6 @@ }, "files": [ "index.d.ts", - "jquery.customSelect-tests.ts" + "jquery.customselect-tests.ts" ] } \ No newline at end of file diff --git a/jquery.datatables/jquery.dataTables-tests.ts b/jquery.datatables/jquery.datatables-tests.ts similarity index 100% rename from jquery.datatables/jquery.dataTables-tests.ts rename to jquery.datatables/jquery.datatables-tests.ts diff --git a/jquery.datatables/tsconfig.json b/jquery.datatables/tsconfig.json index 486b10d9ca..edb98f9b94 100644 --- a/jquery.datatables/tsconfig.json +++ b/jquery.datatables/tsconfig.json @@ -15,6 +15,6 @@ }, "files": [ "index.d.ts", - "jquery.dataTables-tests.ts" + "jquery.datatables-tests.ts" ] } \ No newline at end of file diff --git a/jquery.gridster/gridster-tests.ts b/jquery.gridster/jquery.gridster-tests.ts similarity index 100% rename from jquery.gridster/gridster-tests.ts rename to jquery.gridster/jquery.gridster-tests.ts diff --git a/jquery.gridster/tsconfig.json b/jquery.gridster/tsconfig.json index 775fbfbbd8..5bae952a15 100644 --- a/jquery.gridster/tsconfig.json +++ b/jquery.gridster/tsconfig.json @@ -15,6 +15,6 @@ }, "files": [ "index.d.ts", - "gridster-tests.ts" + "jquery.gridster-tests.ts" ] } \ No newline at end of file diff --git a/jquery.leanmodal/jquery.leanModal-tests.ts b/jquery.leanmodal/jquery.leanmodal-tests.ts similarity index 100% rename from jquery.leanmodal/jquery.leanModal-tests.ts rename to jquery.leanmodal/jquery.leanmodal-tests.ts diff --git a/jquery.leanmodal/tsconfig.json b/jquery.leanmodal/tsconfig.json index ce5f2553ec..a9a32b6d34 100644 --- a/jquery.leanmodal/tsconfig.json +++ b/jquery.leanmodal/tsconfig.json @@ -15,6 +15,6 @@ }, "files": [ "index.d.ts", - "jquery.leanModal-tests.ts" + "jquery.leanmodal-tests.ts" ] } \ No newline at end of file diff --git a/jquery.notifybar/jquery.notifyBar-tests.ts b/jquery.notifybar/jquery.notifybar-tests.ts similarity index 100% rename from jquery.notifybar/jquery.notifyBar-tests.ts rename to jquery.notifybar/jquery.notifybar-tests.ts diff --git a/jquery.notifybar/tsconfig.json b/jquery.notifybar/tsconfig.json index c338f7bf5e..587dec244d 100644 --- a/jquery.notifybar/tsconfig.json +++ b/jquery.notifybar/tsconfig.json @@ -15,6 +15,6 @@ }, "files": [ "index.d.ts", - "jquery.notifyBar-tests.ts" + "jquery.notifybar-tests.ts" ] } \ No newline at end of file diff --git a/jquery.pjax.falsandtru/jquery.pjax-tests.ts b/jquery.pjax.falsandtru/jquery.pjax.falsandtru-tests.ts similarity index 100% rename from jquery.pjax.falsandtru/jquery.pjax-tests.ts rename to jquery.pjax.falsandtru/jquery.pjax.falsandtru-tests.ts diff --git a/jquery.pjax.falsandtru/tsconfig.json b/jquery.pjax.falsandtru/tsconfig.json index eafe636c08..7c619d7288 100644 --- a/jquery.pjax.falsandtru/tsconfig.json +++ b/jquery.pjax.falsandtru/tsconfig.json @@ -15,6 +15,6 @@ }, "files": [ "index.d.ts", - "jquery.pjax-tests.ts" + "jquery.pjax.falsandtru-tests.ts" ] } \ No newline at end of file diff --git a/jquery.postmessage/jquery.postMessage-tests.ts b/jquery.postmessage/jquery.postmessage-tests.ts similarity index 100% rename from jquery.postmessage/jquery.postMessage-tests.ts rename to jquery.postmessage/jquery.postmessage-tests.ts diff --git a/jquery.postmessage/tsconfig.json b/jquery.postmessage/tsconfig.json index 3e70423c66..dd298d2aa0 100644 --- a/jquery.postmessage/tsconfig.json +++ b/jquery.postmessage/tsconfig.json @@ -15,6 +15,6 @@ }, "files": [ "index.d.ts", - "jquery.postMessage-tests.ts" + "jquery.postmessage-tests.ts" ] } \ No newline at end of file diff --git a/jquery.rowgrid/jquery.rowGrid-tests.ts b/jquery.rowgrid/jquery.rowgrid-tests.ts similarity index 100% rename from jquery.rowgrid/jquery.rowGrid-tests.ts rename to jquery.rowgrid/jquery.rowgrid-tests.ts diff --git a/jquery.rowgrid/tsconfig.json b/jquery.rowgrid/tsconfig.json index 55ebd698c1..314bc2a671 100644 --- a/jquery.rowgrid/tsconfig.json +++ b/jquery.rowgrid/tsconfig.json @@ -15,6 +15,6 @@ }, "files": [ "index.d.ts", - "jquery.rowGrid-tests.ts" + "jquery.rowgrid-tests.ts" ] } \ No newline at end of file diff --git a/jquery.scrollto/jquery.scrollTo-tests.ts b/jquery.scrollto/jquery.scrollto-tests.ts similarity index 100% rename from jquery.scrollto/jquery.scrollTo-tests.ts rename to jquery.scrollto/jquery.scrollto-tests.ts diff --git a/jquery.scrollto/tsconfig.json b/jquery.scrollto/tsconfig.json index 183ea5843e..94f73774ed 100644 --- a/jquery.scrollto/tsconfig.json +++ b/jquery.scrollto/tsconfig.json @@ -15,6 +15,6 @@ }, "files": [ "index.d.ts", - "jquery.scrollTo-tests.ts" + "jquery.scrollto-tests.ts" ] } \ No newline at end of file diff --git a/jquery.simplepagination/jquery.simplePagination-tests.ts b/jquery.simplepagination/jquery.simplepagination-tests.ts similarity index 100% rename from jquery.simplepagination/jquery.simplePagination-tests.ts rename to jquery.simplepagination/jquery.simplepagination-tests.ts diff --git a/jquery.simplepagination/tsconfig.json b/jquery.simplepagination/tsconfig.json index 890a63616d..02376bb00c 100644 --- a/jquery.simplepagination/tsconfig.json +++ b/jquery.simplepagination/tsconfig.json @@ -15,6 +15,6 @@ }, "files": [ "index.d.ts", - "jquery.simplePagination-tests.ts" + "jquery.simplepagination-tests.ts" ] } \ No newline at end of file diff --git a/js-fixtures/fixtures-tests.ts b/js-fixtures/js-fixtures-tests.ts similarity index 100% rename from js-fixtures/fixtures-tests.ts rename to js-fixtures/js-fixtures-tests.ts diff --git a/js-fixtures/tsconfig.json b/js-fixtures/tsconfig.json index 3f93c8ccdc..3c1a51cf41 100644 --- a/js-fixtures/tsconfig.json +++ b/js-fixtures/tsconfig.json @@ -15,6 +15,6 @@ }, "files": [ "index.d.ts", - "fixtures-tests.ts" + "js-fixtures-tests.ts" ] } \ No newline at end of file diff --git a/js-md5/md5-tests.ts b/js-md5/js-md5-tests.ts similarity index 100% rename from js-md5/md5-tests.ts rename to js-md5/js-md5-tests.ts diff --git a/js-md5/tsconfig.json b/js-md5/tsconfig.json index cbccd9ae2e..1b5b2dd795 100644 --- a/js-md5/tsconfig.json +++ b/js-md5/tsconfig.json @@ -15,6 +15,6 @@ }, "files": [ "index.d.ts", - "md5-tests.ts" + "js-md5-tests.ts" ] } \ No newline at end of file diff --git a/knockout/tests/knockout-tests.ts b/knockout/test/index.ts similarity index 100% rename from knockout/tests/knockout-tests.ts rename to knockout/test/index.ts diff --git a/knockout/tests/knockout-templatingBehaviors-tests.ts b/knockout/test/templatingBehaviors.ts similarity index 100% rename from knockout/tests/knockout-templatingBehaviors-tests.ts rename to knockout/test/templatingBehaviors.ts diff --git a/knockout/tsconfig.json b/knockout/tsconfig.json index 04246314bb..b09f482a4a 100644 --- a/knockout/tsconfig.json +++ b/knockout/tsconfig.json @@ -15,7 +15,7 @@ }, "files": [ "index.d.ts", - "tests/knockout-templatingBehaviors-tests.ts", - "tests/knockout-tests.ts" + "test/templatingBehaviors.ts", + "test/index.ts" ] } \ No newline at end of file diff --git a/konami.js/konami-tests.ts b/konami.js/konami.js-tests.ts similarity index 100% rename from konami.js/konami-tests.ts rename to konami.js/konami.js-tests.ts diff --git a/konami.js/tsconfig.json b/konami.js/tsconfig.json index 8b4f43df6e..6175df34c2 100644 --- a/konami.js/tsconfig.json +++ b/konami.js/tsconfig.json @@ -15,6 +15,6 @@ }, "files": [ "index.d.ts", - "konami-tests.ts" + "konami.js-tests.ts" ] } \ No newline at end of file diff --git a/localforage/localForage-tests.ts b/localforage/localforage-tests.ts similarity index 100% rename from localforage/localForage-tests.ts rename to localforage/localforage-tests.ts diff --git a/localforage/tsconfig.json b/localforage/tsconfig.json index ac31a49c3e..b2ebf8be91 100644 --- a/localforage/tsconfig.json +++ b/localforage/tsconfig.json @@ -15,6 +15,6 @@ }, "files": [ "index.d.ts", - "localForage-tests.ts" + "localforage-tests.ts" ] } \ No newline at end of file diff --git a/loopback-boot/loopback-boot-test.ts b/loopback-boot/loopback-boot-tests.ts similarity index 100% rename from loopback-boot/loopback-boot-test.ts rename to loopback-boot/loopback-boot-tests.ts diff --git a/loopback-boot/tsconfig.json b/loopback-boot/tsconfig.json index d784404acf..3bd43c78fd 100644 --- a/loopback-boot/tsconfig.json +++ b/loopback-boot/tsconfig.json @@ -15,6 +15,6 @@ }, "files": [ "index.d.ts", - "loopback-boot-test.ts" + "loopback-boot-tests.ts" ] } \ No newline at end of file diff --git a/loopback/loopback-test.ts b/loopback/loopback-tests.ts similarity index 100% rename from loopback/loopback-test.ts rename to loopback/loopback-tests.ts diff --git a/loopback/tsconfig.json b/loopback/tsconfig.json index 9454529143..4ca6819f7e 100644 --- a/loopback/tsconfig.json +++ b/loopback/tsconfig.json @@ -15,6 +15,6 @@ }, "files": [ "index.d.ts", - "loopback-test.ts" + "loopback-tests.ts" ] } \ No newline at end of file diff --git a/maker.js/makerjs-tests.ts b/maker.js/maker.js-tests.ts similarity index 100% rename from maker.js/makerjs-tests.ts rename to maker.js/maker.js-tests.ts diff --git a/maker.js/tsconfig.json b/maker.js/tsconfig.json index cd4be3d273..c3fe4a7a20 100644 --- a/maker.js/tsconfig.json +++ b/maker.js/tsconfig.json @@ -15,6 +15,6 @@ }, "files": [ "index.d.ts", - "makerjs-tests.ts" + "maker.js-tests.ts" ] } \ No newline at end of file diff --git a/mandrill-api/mandrill-tests.ts b/mandrill-api/mandrill-api-tests.ts similarity index 100% rename from mandrill-api/mandrill-tests.ts rename to mandrill-api/mandrill-api-tests.ts diff --git a/mandrill-api/tsconfig.json b/mandrill-api/tsconfig.json index 8f41f411aa..25bf307996 100644 --- a/mandrill-api/tsconfig.json +++ b/mandrill-api/tsconfig.json @@ -15,6 +15,6 @@ }, "files": [ "index.d.ts", - "mandrill-tests.ts" + "mandrill-api-tests.ts" ] } \ No newline at end of file diff --git a/mcustomscrollbar/mCustomScrollbar-tests.ts b/mcustomscrollbar/mcustomscrollbar-tests.ts similarity index 100% rename from mcustomscrollbar/mCustomScrollbar-tests.ts rename to mcustomscrollbar/mcustomscrollbar-tests.ts diff --git a/mcustomscrollbar/tsconfig.json b/mcustomscrollbar/tsconfig.json index 06d2e59f1a..56a75dc8b2 100644 --- a/mcustomscrollbar/tsconfig.json +++ b/mcustomscrollbar/tsconfig.json @@ -15,6 +15,6 @@ }, "files": [ "index.d.ts", - "mCustomScrollbar-tests.ts" + "mcustomscrollbar-tests.ts" ] } \ No newline at end of file diff --git a/memory-fs/memory-fs-tests.ts b/memory-fs/test/index.ts similarity index 89% rename from memory-fs/memory-fs-tests.ts rename to memory-fs/test/index.ts index 61302916be..07abb3e3fe 100644 --- a/memory-fs/memory-fs-tests.ts +++ b/memory-fs/test/index.ts @@ -1,5 +1,3 @@ -/// - import MemoryFileSystem = require('memory-fs'); const fs = new MemoryFileSystem({}); diff --git a/memory-fs/lib/join-tests.ts b/memory-fs/test/join.ts similarity index 100% rename from memory-fs/lib/join-tests.ts rename to memory-fs/test/join.ts diff --git a/memory-fs/lib/normalize-tests.ts b/memory-fs/test/normalize.ts similarity index 100% rename from memory-fs/lib/normalize-tests.ts rename to memory-fs/test/normalize.ts diff --git a/memory-fs/tsconfig.json b/memory-fs/tsconfig.json index 8236038c24..f1afc33095 100644 --- a/memory-fs/tsconfig.json +++ b/memory-fs/tsconfig.json @@ -15,10 +15,10 @@ }, "files": [ "index.d.ts", - "memory-fs-tests.ts", - "lib/join-tests.ts", "lib/join.d.ts", - "lib/normalize-tests.ts", - "lib/normalize.d.ts" + "lib/normalize.d.ts", + "test/index.ts", + "test/join.ts", + "test/normalize.ts" ] } \ No newline at end of file diff --git a/metric-suffix/metric-suffix-external-tests.ts b/metric-suffix/metric-suffix-external-tests.ts deleted file mode 100644 index 5b22aeeaa1..0000000000 --- a/metric-suffix/metric-suffix-external-tests.ts +++ /dev/null @@ -1,22 +0,0 @@ -import metric_suffix = require('metric-suffix'); - -metric_suffix(42) // 42 -metric_suffix(999) // 999 -metric_suffix(1000) // 1.0k - -metric_suffix(1234, 2) // 1.2k -metric_suffix(12345, 2) // 12k -metric_suffix(123456, 2) // 123k - -metric_suffix(1234, 3) // 1.23k -metric_suffix(12345, 3) // 12.3k -metric_suffix(123456, 3) // 123k - -metric_suffix(1234, 4) // 1.234k -metric_suffix(12345, 4) // 12.35k -metric_suffix(123456, 4) // 123.5k - -metric_suffix(986725) // 987k -metric_suffix(986725, 4) // 986.7k -metric_suffix(986725123) // 987M -metric_suffix(986725123, 5) // 986.73M \ No newline at end of file diff --git a/metric-suffix/tsconfig.json b/metric-suffix/tsconfig.json index 313286b950..c23b32a4e4 100644 --- a/metric-suffix/tsconfig.json +++ b/metric-suffix/tsconfig.json @@ -15,7 +15,6 @@ }, "files": [ "index.d.ts", - "metric-suffix-tests.ts", - "metric-suffix-external-tests.ts" + "metric-suffix-tests.ts" ] } \ No newline at end of file diff --git a/microsoft-ajax/microsoft.ajax-tests.ts b/microsoft-ajax/microsoft-ajax-tests.ts similarity index 100% rename from microsoft-ajax/microsoft.ajax-tests.ts rename to microsoft-ajax/microsoft-ajax-tests.ts diff --git a/microsoft-ajax/tsconfig.json b/microsoft-ajax/tsconfig.json index 0066ff394e..3ed87d107e 100644 --- a/microsoft-ajax/tsconfig.json +++ b/microsoft-ajax/tsconfig.json @@ -15,6 +15,6 @@ }, "files": [ "index.d.ts", - "microsoft.ajax-tests.ts" + "microsoft-ajax-tests.ts" ] } \ No newline at end of file diff --git a/mousetrap/mousetrap-global-bind-tests.ts b/mousetrap/test/global-bind.ts similarity index 100% rename from mousetrap/mousetrap-global-bind-tests.ts rename to mousetrap/test/global-bind.ts diff --git a/mousetrap/mousetrap-tests.ts b/mousetrap/test/index.ts similarity index 100% rename from mousetrap/mousetrap-tests.ts rename to mousetrap/test/index.ts diff --git a/mousetrap/tsconfig.json b/mousetrap/tsconfig.json index 003c378176..d7def634a2 100644 --- a/mousetrap/tsconfig.json +++ b/mousetrap/tsconfig.json @@ -15,7 +15,7 @@ }, "files": [ "index.d.ts", - "mousetrap-tests.ts", - "mousetrap-global-bind-tests.ts" + "test/index.ts", + "test/global-bind.ts" ] } \ No newline at end of file diff --git a/ng-cordova/actionSheet-tests.ts b/ng-cordova/test/actionSheet.ts similarity index 100% rename from ng-cordova/actionSheet-tests.ts rename to ng-cordova/test/actionSheet.ts diff --git a/ng-cordova/app-version-tests.ts b/ng-cordova/test/app-version.ts similarity index 100% rename from ng-cordova/app-version-tests.ts rename to ng-cordova/test/app-version.ts diff --git a/ng-cordova/appAvailability-tests.ts b/ng-cordova/test/appAvailability.ts similarity index 100% rename from ng-cordova/appAvailability-tests.ts rename to ng-cordova/test/appAvailability.ts diff --git a/ng-cordova/badge-tests.ts b/ng-cordova/test/badge.ts similarity index 100% rename from ng-cordova/badge-tests.ts rename to ng-cordova/test/badge.ts diff --git a/ng-cordova/camera-tests.ts b/ng-cordova/test/camera.ts similarity index 100% rename from ng-cordova/camera-tests.ts rename to ng-cordova/test/camera.ts diff --git a/ng-cordova/datepicker-tests.ts b/ng-cordova/test/datepicker.ts similarity index 100% rename from ng-cordova/datepicker-tests.ts rename to ng-cordova/test/datepicker.ts diff --git a/ng-cordova/device-tests.ts b/ng-cordova/test/device.ts similarity index 100% rename from ng-cordova/device-tests.ts rename to ng-cordova/test/device.ts diff --git a/ng-cordova/deviceMotion-tests.ts b/ng-cordova/test/deviceMotion.ts similarity index 100% rename from ng-cordova/deviceMotion-tests.ts rename to ng-cordova/test/deviceMotion.ts diff --git a/ng-cordova/deviceOrientation-tests.ts b/ng-cordova/test/deviceOrientation.ts similarity index 100% rename from ng-cordova/deviceOrientation-tests.ts rename to ng-cordova/test/deviceOrientation.ts diff --git a/ng-cordova/dialogs-tests.ts b/ng-cordova/test/dialogs.ts similarity index 100% rename from ng-cordova/dialogs-tests.ts rename to ng-cordova/test/dialogs.ts diff --git a/ng-cordova/emailComposer-tests.ts b/ng-cordova/test/emailComposer.ts similarity index 100% rename from ng-cordova/emailComposer-tests.ts rename to ng-cordova/test/emailComposer.ts diff --git a/ng-cordova/file-tests.ts b/ng-cordova/test/file.ts similarity index 100% rename from ng-cordova/file-tests.ts rename to ng-cordova/test/file.ts diff --git a/ng-cordova/fileTransfer-tests.ts b/ng-cordova/test/fileTransfer.ts similarity index 100% rename from ng-cordova/fileTransfer-tests.ts rename to ng-cordova/test/fileTransfer.ts diff --git a/ng-cordova/geolocation-tests.ts b/ng-cordova/test/geolocation.ts similarity index 100% rename from ng-cordova/geolocation-tests.ts rename to ng-cordova/test/geolocation.ts diff --git a/ng-cordova/network-tests.ts b/ng-cordova/test/network.ts similarity index 100% rename from ng-cordova/network-tests.ts rename to ng-cordova/test/network.ts diff --git a/ng-cordova/toast-tests.ts b/ng-cordova/test/toast.ts similarity index 100% rename from ng-cordova/toast-tests.ts rename to ng-cordova/test/toast.ts diff --git a/ng-cordova/tsconfig.json b/ng-cordova/tsconfig.json index 68bdca092a..68f86a18f9 100644 --- a/ng-cordova/tsconfig.json +++ b/ng-cordova/tsconfig.json @@ -16,21 +16,21 @@ }, "files": [ "index.d.ts", - "actionSheet-tests.ts", - "app-version-tests.ts", - "appAvailability-tests.ts", - "badge-tests.ts", - "camera-tests.ts", - "datepicker-tests.ts", - "device-tests.ts", - "deviceMotion-tests.ts", - "deviceOrientation-tests.ts", - "dialogs-tests.ts", - "emailComposer-tests.ts", - "file-tests.ts", - "fileTransfer-tests.ts", - "geolocation-tests.ts", - "network-tests.ts", - "toast-tests.ts" + "test/actionSheet.ts", + "test/app-version.ts", + "test/appAvailability.ts", + "test/badge.ts", + "test/camera.ts", + "test/datepicker.ts", + "test/device.ts", + "test/deviceMotion.ts", + "test/deviceOrientation.ts", + "test/dialogs.ts", + "test/emailComposer.ts", + "test/file.ts", + "test/fileTransfer.ts", + "test/geolocation.ts", + "test/network.ts", + "test/toast.ts" ] } \ No newline at end of file diff --git a/ngtoaster/angularjs-toaster-tests.ts b/ngtoaster/ngtoaster-tests.ts similarity index 100% rename from ngtoaster/angularjs-toaster-tests.ts rename to ngtoaster/ngtoaster-tests.ts diff --git a/ngtoaster/tsconfig.json b/ngtoaster/tsconfig.json index eaf3b5027d..67970d092e 100644 --- a/ngtoaster/tsconfig.json +++ b/ngtoaster/tsconfig.json @@ -15,6 +15,6 @@ }, "files": [ "index.d.ts", - "angularjs-toaster-tests.ts" + "ngtoaster-tests.ts" ] } \ No newline at end of file diff --git a/novnc/noVNC-tests.ts b/novnc/novnc-tests.ts similarity index 100% rename from novnc/noVNC-tests.ts rename to novnc/novnc-tests.ts diff --git a/novnc/tsconfig.json b/novnc/tsconfig.json index bfb76135a7..3c88833118 100644 --- a/novnc/tsconfig.json +++ b/novnc/tsconfig.json @@ -15,6 +15,6 @@ }, "files": [ "index.d.ts", - "noVNC-tests.ts" + "novnc-tests.ts" ] } \ No newline at end of file diff --git a/numeral/numeraljs-tests.ts b/numeral/numeral-tests.ts similarity index 100% rename from numeral/numeraljs-tests.ts rename to numeral/numeral-tests.ts diff --git a/numeral/tsconfig.json b/numeral/tsconfig.json index 61386fac51..5d51b7d6cc 100644 --- a/numeral/tsconfig.json +++ b/numeral/tsconfig.json @@ -15,6 +15,6 @@ }, "files": [ "index.d.ts", - "numeraljs-tests.ts" + "numeral-tests.ts" ] } \ No newline at end of file diff --git a/nw.gui/node-webkit-tests.ts b/nw.gui/nw.gui-tests.ts similarity index 100% rename from nw.gui/node-webkit-tests.ts rename to nw.gui/nw.gui-tests.ts diff --git a/nw.gui/tsconfig.json b/nw.gui/tsconfig.json index 0a184e9e8b..d59063a0b2 100644 --- a/nw.gui/tsconfig.json +++ b/nw.gui/tsconfig.json @@ -15,6 +15,6 @@ }, "files": [ "index.d.ts", - "node-webkit-tests.ts" + "nw.gui-tests.ts" ] } \ No newline at end of file diff --git a/openui5/ui5-tests.ts b/openui5/openui5-tests.ts similarity index 100% rename from openui5/ui5-tests.ts rename to openui5/openui5-tests.ts diff --git a/openui5/tsconfig.json b/openui5/tsconfig.json index 428f84704f..97d54dd860 100644 --- a/openui5/tsconfig.json +++ b/openui5/tsconfig.json @@ -18,6 +18,6 @@ "jquery.sap.d.ts", "sap.m.d.ts", "sap.ui.d.ts", - "ui5-tests.ts" + "openui5-tests.ts" ] } \ No newline at end of file diff --git a/paralleljs/parallel-tests.ts b/paralleljs/paralleljs-tests.ts similarity index 100% rename from paralleljs/parallel-tests.ts rename to paralleljs/paralleljs-tests.ts diff --git a/paralleljs/tsconfig.json b/paralleljs/tsconfig.json index debc292389..f6ae0047ac 100644 --- a/paralleljs/tsconfig.json +++ b/paralleljs/tsconfig.json @@ -15,6 +15,6 @@ }, "files": [ "index.d.ts", - "parallel-tests.ts" + "paralleljs-tests.ts" ] } \ No newline at end of file diff --git a/paypal-cordova-plugin/PayPal-Cordova-Plugin-tests.ts b/paypal-cordova-plugin/paypal-cordova-plugin-tests.ts similarity index 100% rename from paypal-cordova-plugin/PayPal-Cordova-Plugin-tests.ts rename to paypal-cordova-plugin/paypal-cordova-plugin-tests.ts diff --git a/paypal-cordova-plugin/tsconfig.json b/paypal-cordova-plugin/tsconfig.json index 4cd4acf310..c32cd43755 100644 --- a/paypal-cordova-plugin/tsconfig.json +++ b/paypal-cordova-plugin/tsconfig.json @@ -15,6 +15,6 @@ }, "files": [ "index.d.ts", - "PayPal-Cordova-Plugin-tests.ts" + "paypal-cordova-plugin-tests.ts" ] } \ No newline at end of file diff --git a/pleasejs/please-tests.ts b/pleasejs/pleasejs-tests.ts similarity index 100% rename from pleasejs/please-tests.ts rename to pleasejs/pleasejs-tests.ts diff --git a/pleasejs/tsconfig.json b/pleasejs/tsconfig.json index 58ebc9d426..0a595973af 100644 --- a/pleasejs/tsconfig.json +++ b/pleasejs/tsconfig.json @@ -15,6 +15,6 @@ }, "files": [ "index.d.ts", - "please-tests.ts" + "pleasejs-tests.ts" ] } \ No newline at end of file diff --git a/popper.js/popper-tests.ts b/popper.js/popper.js-tests.ts similarity index 100% rename from popper.js/popper-tests.ts rename to popper.js/popper.js-tests.ts diff --git a/popper.js/tsconfig.json b/popper.js/tsconfig.json index a9af98d819..599036ff15 100644 --- a/popper.js/tsconfig.json +++ b/popper.js/tsconfig.json @@ -15,6 +15,6 @@ }, "files": [ "index.d.ts", - "popper-tests.ts" + "popper.js-tests.ts" ] } \ No newline at end of file diff --git a/pouchdb/pouch-tests.ts b/pouchdb/pouchdb-tests.ts similarity index 100% rename from pouchdb/pouch-tests.ts rename to pouchdb/pouchdb-tests.ts diff --git a/pouchdb/tsconfig.json b/pouchdb/tsconfig.json index 173d43fcd5..09bc6a7440 100644 --- a/pouchdb/tsconfig.json +++ b/pouchdb/tsconfig.json @@ -15,6 +15,6 @@ }, "files": [ "index.d.ts", - "pouch-tests.ts" + "pouchdb-tests.ts" ] } \ No newline at end of file diff --git a/prismjs/prism-tests.ts b/prismjs/prismjs-tests.ts similarity index 100% rename from prismjs/prism-tests.ts rename to prismjs/prismjs-tests.ts diff --git a/prismjs/tsconfig.json b/prismjs/tsconfig.json index 9acf5a037c..972a24f9fe 100644 --- a/prismjs/tsconfig.json +++ b/prismjs/tsconfig.json @@ -15,6 +15,6 @@ }, "files": [ "index.d.ts", - "prism-tests.ts" + "prismjs-tests.ts" ] } \ No newline at end of file diff --git a/progressjs/progress-tests.ts b/progressjs/progressjs-tests.ts similarity index 100% rename from progressjs/progress-tests.ts rename to progressjs/progressjs-tests.ts diff --git a/progressjs/tsconfig.json b/progressjs/tsconfig.json index 0961490fd3..c04d0442c1 100644 --- a/progressjs/tsconfig.json +++ b/progressjs/tsconfig.json @@ -15,6 +15,6 @@ }, "files": [ "index.d.ts", - "progress-tests.ts" + "progressjs-tests.ts" ] } \ No newline at end of file diff --git a/pubsub-js/PubSub-tests.ts b/pubsub-js/pubsub-js-tests.ts similarity index 100% rename from pubsub-js/PubSub-tests.ts rename to pubsub-js/pubsub-js-tests.ts diff --git a/pubsub-js/tsconfig.json b/pubsub-js/tsconfig.json index d2fa213f84..eda08b963b 100644 --- a/pubsub-js/tsconfig.json +++ b/pubsub-js/tsconfig.json @@ -15,6 +15,6 @@ }, "files": [ "index.d.ts", - "PubSub-tests.ts" + "pubsub-js-tests.ts" ] } \ No newline at end of file diff --git a/random-js/random-js-ambient-tests.ts b/random-js/random-js-tests.ts similarity index 100% rename from random-js/random-js-ambient-tests.ts rename to random-js/random-js-tests.ts diff --git a/random-js/tsconfig.json b/random-js/tsconfig.json index 04313eb3db..eb2e70e45c 100644 --- a/random-js/tsconfig.json +++ b/random-js/tsconfig.json @@ -15,6 +15,6 @@ }, "files": [ "index.d.ts", - "random-js-ambient-tests.ts" + "random-js-tests.ts" ] } \ No newline at end of file diff --git a/raven-js/ravenjs-tests.ts b/raven-js/raven-js-tests.ts similarity index 100% rename from raven-js/ravenjs-tests.ts rename to raven-js/raven-js-tests.ts diff --git a/raven-js/tsconfig.json b/raven-js/tsconfig.json index 821b76f72e..78f622e685 100644 --- a/raven-js/tsconfig.json +++ b/raven-js/tsconfig.json @@ -15,6 +15,6 @@ }, "files": [ "index.d.ts", - "ravenjs-tests.ts" + "raven-js-tests.ts" ] } \ No newline at end of file diff --git a/react-native/react-native-animated-tests.tsx b/react-native/test/animated.tsx similarity index 100% rename from react-native/react-native-animated-tests.tsx rename to react-native/test/animated.tsx diff --git a/react-native/react-native-tests.tsx b/react-native/test/index.tsx similarity index 100% rename from react-native/react-native-tests.tsx rename to react-native/test/index.tsx diff --git a/react-native/tsconfig.json b/react-native/tsconfig.json index 1a6f765478..930ac3d811 100644 --- a/react-native/tsconfig.json +++ b/react-native/tsconfig.json @@ -16,7 +16,7 @@ }, "files": [ "index.d.ts", - "react-native-tests.tsx", - "react-native-animated-tests.tsx" + "test/index.tsx", + "test/animated.tsx" ] } \ No newline at end of file diff --git a/react/react-tests.ts b/react/test/index.ts similarity index 100% rename from react/react-tests.ts rename to react/test/index.ts diff --git a/react/react-tsx-tests.tsx b/react/test/tsx.tsx similarity index 100% rename from react/react-tsx-tests.tsx rename to react/test/tsx.tsx diff --git a/react/tsconfig.json b/react/tsconfig.json index bf6595e99f..f26f721c8c 100644 --- a/react/tsconfig.json +++ b/react/tsconfig.json @@ -1,8 +1,8 @@ { "files": [ "index.d.ts", - "react-tests.ts", - "react-tsx-tests.tsx" + "test/index.ts", + "test/tsx.tsx" ], "compilerOptions": { "module": "commonjs", diff --git a/requirejs-domready/domready-tests.ts b/requirejs-domready/requirejs-domready-tests.ts similarity index 100% rename from requirejs-domready/domready-tests.ts rename to requirejs-domready/requirejs-domready-tests.ts diff --git a/requirejs-domready/tsconfig.json b/requirejs-domready/tsconfig.json index 4a6ca208f5..5d6731cbd1 100644 --- a/requirejs-domready/tsconfig.json +++ b/requirejs-domready/tsconfig.json @@ -15,6 +15,6 @@ }, "files": [ "index.d.ts", - "domready-tests.ts" + "requirejs-domready-tests.ts" ] } \ No newline at end of file diff --git a/requirejs/require-tests.ts b/requirejs/requirejs-tests.ts similarity index 100% rename from requirejs/require-tests.ts rename to requirejs/requirejs-tests.ts diff --git a/requirejs/tsconfig.json b/requirejs/tsconfig.json index 7fc6ef8516..6d8c38c0c9 100644 --- a/requirejs/tsconfig.json +++ b/requirejs/tsconfig.json @@ -15,6 +15,6 @@ }, "files": [ "index.d.ts", - "require-tests.ts" + "requirejs-tests.ts" ] } \ No newline at end of file diff --git a/rx-angular/rx.angular-tests.ts b/rx-angular/rx-angular-tests.ts similarity index 100% rename from rx-angular/rx.angular-tests.ts rename to rx-angular/rx-angular-tests.ts diff --git a/rx-angular/tsconfig.json b/rx-angular/tsconfig.json index 2412cb2874..084109bfb3 100644 --- a/rx-angular/tsconfig.json +++ b/rx-angular/tsconfig.json @@ -15,6 +15,6 @@ }, "files": [ "index.d.ts", - "rx.angular-tests.ts" + "rx-angular-tests.ts" ] } \ No newline at end of file diff --git a/sammy/sammyjs-tests.ts b/sammy/sammy-tests.ts similarity index 100% rename from sammy/sammyjs-tests.ts rename to sammy/sammy-tests.ts diff --git a/sammy/tsconfig.json b/sammy/tsconfig.json index 34996aa4cc..15b4050f9e 100644 --- a/sammy/tsconfig.json +++ b/sammy/tsconfig.json @@ -15,6 +15,6 @@ }, "files": [ "index.d.ts", - "sammyjs-tests.ts" + "sammy-tests.ts" ] } \ No newline at end of file diff --git a/selenium-webdriver/chrome-tests.ts b/selenium-webdriver/test/chrome.ts similarity index 100% rename from selenium-webdriver/chrome-tests.ts rename to selenium-webdriver/test/chrome.ts diff --git a/selenium-webdriver/firefox-tests.ts b/selenium-webdriver/test/firefox.ts similarity index 100% rename from selenium-webdriver/firefox-tests.ts rename to selenium-webdriver/test/firefox.ts diff --git a/selenium-webdriver/index-tests.ts b/selenium-webdriver/test/index.ts similarity index 100% rename from selenium-webdriver/index-tests.ts rename to selenium-webdriver/test/index.ts diff --git a/selenium-webdriver/tsconfig.json b/selenium-webdriver/tsconfig.json index 89e3b4fd9f..3925dd11ee 100644 --- a/selenium-webdriver/tsconfig.json +++ b/selenium-webdriver/tsconfig.json @@ -15,18 +15,18 @@ }, "files": [ "index.d.ts", - "index-tests.ts", "chrome.d.ts", - "chrome-tests.ts", "edge.d.ts", "executors.d.ts", "firefox.d.ts", - "firefox-tests.ts", "http.d.ts", "ie.d.ts", "opera.d.ts", "remote.d.ts", "safari.d.ts", - "testing.d.ts" + "testing.d.ts", + "test/index.ts", + "test/chrome.ts", + "test/firefox.ts" ] } diff --git a/sencha_touch/SenchaTouch-tests.ts b/sencha_touch/sencha_touch-tests.ts similarity index 100% rename from sencha_touch/SenchaTouch-tests.ts rename to sencha_touch/sencha_touch-tests.ts diff --git a/sencha_touch/tsconfig.json b/sencha_touch/tsconfig.json index 3ed5d8263d..a8a395e97a 100644 --- a/sencha_touch/tsconfig.json +++ b/sencha_touch/tsconfig.json @@ -1,7 +1,7 @@ { "files": [ "index.d.ts", - "SenchaTouch-tests.ts" + "sencha_touch-tests.ts" ], "compilerOptions": { "module": "commonjs", diff --git a/sharepoint/SharePoint-tests.ts b/sharepoint/sharepoint-tests.ts similarity index 100% rename from sharepoint/SharePoint-tests.ts rename to sharepoint/sharepoint-tests.ts diff --git a/sharepoint/tsconfig.json b/sharepoint/tsconfig.json index 76d3dc13a0..e631b4c53e 100644 --- a/sharepoint/tsconfig.json +++ b/sharepoint/tsconfig.json @@ -15,6 +15,6 @@ }, "files": [ "index.d.ts", - "SharePoint-tests.ts" + "sharepoint-tests.ts" ] } \ No newline at end of file diff --git a/signals/js-signals-tests.ts b/signals/signals-tests.ts similarity index 100% rename from signals/js-signals-tests.ts rename to signals/signals-tests.ts diff --git a/signals/tsconfig.json b/signals/tsconfig.json index 13bc50af80..94b8397fd2 100644 --- a/signals/tsconfig.json +++ b/signals/tsconfig.json @@ -15,6 +15,6 @@ }, "files": [ "index.d.ts", - "js-signals-tests.ts" + "signals-tests.ts" ] } \ No newline at end of file diff --git a/slickgrid/slickgrid-tests.ts b/slickgrid/test/index.ts similarity index 100% rename from slickgrid/slickgrid-tests.ts rename to slickgrid/test/index.ts diff --git a/slickgrid/slick.autotooltips-tests.ts b/slickgrid/test/slick.autotooltips.ts similarity index 100% rename from slickgrid/slick.autotooltips-tests.ts rename to slickgrid/test/slick.autotooltips.ts diff --git a/slickgrid/slick.checkboxselectcolumn-tests.ts b/slickgrid/test/slick.checkboxselectcolumn.ts similarity index 89% rename from slickgrid/slick.checkboxselectcolumn-tests.ts rename to slickgrid/test/slick.checkboxselectcolumn.ts index 593496537f..c0f08bb2af 100644 --- a/slickgrid/slick.checkboxselectcolumn-tests.ts +++ b/slickgrid/test/slick.checkboxselectcolumn.ts @@ -1,7 +1,3 @@ -/// -/// -/// - /** * Extracted from https://github.com/mleibman/SlickGrid/blob/master/examples/example-checkbox-row-select.html */ diff --git a/slickgrid/tsconfig.json b/slickgrid/tsconfig.json index ff7ab0e597..081819d112 100644 --- a/slickgrid/tsconfig.json +++ b/slickgrid/tsconfig.json @@ -15,13 +15,13 @@ }, "files": [ "index.d.ts", - "slickgrid-tests.ts", "slick.autotooltips.d.ts", - "slick.autotooltips-tests.ts", "slick.checkboxselectcolumn.d.ts", - "slick.checkboxselectcolumn-tests.ts", "slick.columnpicker.d.ts", "slick.headerbuttons.d.ts", - "slick.rowselectionmodel.d.ts" + "slick.rowselectionmodel.d.ts", + "test/index.ts", + "test/slick.autotooltips.ts", + "test/slick.checkboxselectcolumn.ts" ] } \ No newline at end of file diff --git a/sprintf-js/sprintf-tests.ts b/sprintf-js/sprintf-js-tests.ts similarity index 100% rename from sprintf-js/sprintf-tests.ts rename to sprintf-js/sprintf-js-tests.ts diff --git a/sprintf-js/tsconfig.json b/sprintf-js/tsconfig.json index 51135a42a2..f3209176f2 100644 --- a/sprintf-js/tsconfig.json +++ b/sprintf-js/tsconfig.json @@ -15,6 +15,6 @@ }, "files": [ "index.d.ts", - "sprintf-tests.ts" + "sprintf-js-tests.ts" ] } \ No newline at end of file diff --git a/svg.js/svgjs-tests.ts b/svg.js/svg.js-tests.ts similarity index 100% rename from svg.js/svgjs-tests.ts rename to svg.js/svg.js-tests.ts diff --git a/svg.js/tsconfig.json b/svg.js/tsconfig.json index 720007c430..fe7ec62362 100644 --- a/svg.js/tsconfig.json +++ b/svg.js/tsconfig.json @@ -15,6 +15,6 @@ }, "files": [ "index.d.ts", - "svgjs-tests.ts" + "svg.js-tests.ts" ] } \ No newline at end of file diff --git a/touch-events/touch-event-tests.ts b/touch-events/touch-events-tests.ts similarity index 100% rename from touch-events/touch-event-tests.ts rename to touch-events/touch-events-tests.ts diff --git a/touch-events/tsconfig.json b/touch-events/tsconfig.json index 9193ccfb7e..2d6a066fdf 100644 --- a/touch-events/tsconfig.json +++ b/touch-events/tsconfig.json @@ -15,6 +15,6 @@ }, "files": [ "index.d.ts", - "touch-event-tests.ts" + "touch-events-tests.ts" ] } \ No newline at end of file diff --git a/uuidjs/tsconfig.json b/uuidjs/tsconfig.json index 6c43a5006f..5de0c29bb1 100644 --- a/uuidjs/tsconfig.json +++ b/uuidjs/tsconfig.json @@ -15,6 +15,6 @@ }, "files": [ "index.d.ts", - "UUID-tests.ts" + "uuidjs-tests.ts" ] } \ No newline at end of file diff --git a/uuidjs/UUID-tests.ts b/uuidjs/uuidjs-tests.ts similarity index 100% rename from uuidjs/UUID-tests.ts rename to uuidjs/uuidjs-tests.ts diff --git a/vex-js/tsconfig.json b/vex-js/tsconfig.json index fcaf4b9f3b..3428a5b5ed 100644 --- a/vex-js/tsconfig.json +++ b/vex-js/tsconfig.json @@ -15,6 +15,6 @@ }, "files": [ "index.d.ts", - "vex-tests.ts" + "vex-js-tests.ts" ] } \ No newline at end of file diff --git a/vex-js/vex-tests.ts b/vex-js/vex-js-tests.ts similarity index 100% rename from vex-js/vex-tests.ts rename to vex-js/vex-js-tests.ts diff --git a/vivus/tsconfig.json b/vivus/tsconfig.json index 3d8c032420..1afb932f4c 100644 --- a/vivus/tsconfig.json +++ b/vivus/tsconfig.json @@ -15,6 +15,6 @@ }, "files": [ "index.d.ts", - "index-tests.ts" + "vivus-tests.ts" ] } \ No newline at end of file diff --git a/vivus/index-tests.ts b/vivus/vivus-tests.ts similarity index 100% rename from vivus/index-tests.ts rename to vivus/vivus-tests.ts diff --git a/webrtc/MediaStream-tests.ts b/webrtc/test/MediaStream.ts similarity index 97% rename from webrtc/MediaStream-tests.ts rename to webrtc/test/MediaStream.ts index e45154bd44..d8c87afdec 100644 --- a/webrtc/MediaStream-tests.ts +++ b/webrtc/test/MediaStream.ts @@ -1,4 +1,3 @@ -/// var mediaStreamConstraints: MediaStreamConstraints = { audio: true, video: true }; var mediaTrackConstraintSet: MediaTrackConstraintSet = {}; diff --git a/webrtc/RTCPeerConnection-tests.ts b/webrtc/test/RTCPeerConnection.ts similarity index 97% rename from webrtc/RTCPeerConnection-tests.ts rename to webrtc/test/RTCPeerConnection.ts index dcb6bf8657..1272327ac2 100644 --- a/webrtc/RTCPeerConnection-tests.ts +++ b/webrtc/test/RTCPeerConnection.ts @@ -1,6 +1,3 @@ -/// -/// - let defaultIceServers: RTCIceServer[] = RTCPeerConnection.defaultIceServers; if (defaultIceServers.length > 0) { let urls = defaultIceServers[0].urls; diff --git a/webrtc/tsconfig.json b/webrtc/tsconfig.json index 00a9884815..fdda3c7ab0 100644 --- a/webrtc/tsconfig.json +++ b/webrtc/tsconfig.json @@ -15,7 +15,7 @@ }, "files": [ "index.d.ts", - "MediaStream-tests.ts", - "RTCPeerConnection-tests.ts" + "test/MediaStream.ts", + "test/RTCPeerConnection.ts" ] } \ No newline at end of file diff --git a/x2js/tsconfig.json b/x2js/tsconfig.json index 860553af5b..bb82a3b504 100644 --- a/x2js/tsconfig.json +++ b/x2js/tsconfig.json @@ -15,6 +15,6 @@ }, "files": [ "index.d.ts", - "xml2json-tests.ts" + "x2js-tests.ts" ] } \ No newline at end of file diff --git a/x2js/xml2json-tests.ts b/x2js/x2js-tests.ts similarity index 100% rename from x2js/xml2json-tests.ts rename to x2js/x2js-tests.ts From 9aaced75157b7c33649ad4070211915f986c66e9 Mon Sep 17 00:00:00 2001 From: Thomas Townsend Date: Tue, 10 Jan 2017 14:34:19 +0000 Subject: [PATCH 046/100] Remove MapStore for flux v3.0 (#13819) * Remove MapStore for flux v3.0 * Add version to header * Add new api changes * Remove unneeded dependency on immutable * Remove package.json file for flux --- flux/index.d.ts | 3 +-- flux/package.json | 5 ----- flux/utils/index.d.ts | 45 +++++++++++++++---------------------------- 3 files changed, 17 insertions(+), 36 deletions(-) delete mode 100644 flux/package.json diff --git a/flux/index.d.ts b/flux/index.d.ts index 252d1c7920..4b9c261040 100644 --- a/flux/index.d.ts +++ b/flux/index.d.ts @@ -1,11 +1,10 @@ -// Type definitions for Flux +// Type definitions for Flux 3.0 // Project: http://facebook.github.io/flux/ // Definitions by: Steve Baker , Giedrius Grabauskas // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped /// /// -/// export = Flux; diff --git a/flux/package.json b/flux/package.json deleted file mode 100644 index aa7d5773ad..0000000000 --- a/flux/package.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "dependencies": { - "immutable": "^3.8.1" - } -} diff --git a/flux/utils/index.d.ts b/flux/utils/index.d.ts index d69a6f1e55..b223945181 100644 --- a/flux/utils/index.d.ts +++ b/flux/utils/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for Flux Utils +// Type definitions for Flux Utils 3.0 // Project: http://facebook.github.io/flux/ // Definitions by: Steve Baker , Giedrius Grabauskas // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped @@ -6,12 +6,10 @@ /// /// /// -/// import * as React from 'react'; import * as Flux from 'flux'; import * as fbEmitter from 'fbemitter'; -import * as immutable from 'immutable'; export = FluxUtils; @@ -34,6 +32,12 @@ declare namespace FluxUtils { * @type {boolean} */ withProps?: boolean; + /** + * Default value: false + * + * @type {boolean} + */ + withContext?: boolean; } export class Container { @@ -44,35 +48,18 @@ declare namespace FluxUtils { * The provided base class must have static methods getStores() and calculateState(). */ static create(base: React.ComponentClass, options?: RealOptions): React.ComponentClass; - } - /** - * This class extends ReduceStore and defines the state as an immutable map. - */ - export class MapStore extends ReduceStore, TPayload> { - /** - * Access the value at the given key. - * Throws an error if the key does not exist in the cache. - */ - at(key: K): V; + /** - * Check if the cache has a particular key - */ - has(key: K): boolean; - - /** - * Get the value of a particular key. - * Returns undefined if the key does not exist in the cache. - */ - get(key: K): V; - - /** - * Gets an array of keys and puts the values in a map if they exist, - * it allows providing a previous result to update instead of generating a new map. - * Providing a previous result allows the possibility of keeping the same reference if the keys did not change. - */ - getAll(keys: immutable.Iterable.Indexed, prev?: immutable.Map): immutable.Map; + * This is a way to connect stores to a functional stateless view + */ + static createFunctional( + viewFn: (props: State) => React.ReactElement, + getStores: (props?: Props, context?: any) => FluxUtils.Store[], + calculateState: (prevState?: State, props?: Props, context?: any) => State, + options?: RealOptions + ): React.ComponentClass; } export class ReduceStore extends Store { From b29f39d324edbb9e714d28423dc67da5e2fd62ee Mon Sep 17 00:00:00 2001 From: Andy Date: Tue, 10 Jan 2017 07:49:04 -0800 Subject: [PATCH 047/100] Fix path mappings (#13902) * An old version must have a path mapping to itself * react-daterange-picker doesn't need a dependency on "moment", since that isn't used directly, only through "moment-range" (which does have the dependency). --- ember/v1/tsconfig.json | 2 +- hammerjs/v1/tsconfig.json | 2 +- ion.rangeslider/v1/tsconfig.json | 2 +- react-daterange-picker/package.json | 5 ----- react-daterange-picker/tsconfig.json | 6 ------ 5 files changed, 3 insertions(+), 14 deletions(-) delete mode 100644 react-daterange-picker/package.json diff --git a/ember/v1/tsconfig.json b/ember/v1/tsconfig.json index 04fdc535c5..2354a6e4db 100644 --- a/ember/v1/tsconfig.json +++ b/ember/v1/tsconfig.json @@ -11,7 +11,7 @@ ], "types": [], "paths": { - "ember": ["ember/v0"] + "ember": ["ember/v1"] }, "noEmit": true, "forceConsistentCasingInFileNames": true diff --git a/hammerjs/v1/tsconfig.json b/hammerjs/v1/tsconfig.json index deecbdb055..63de88e4e7 100644 --- a/hammerjs/v1/tsconfig.json +++ b/hammerjs/v1/tsconfig.json @@ -11,7 +11,7 @@ ], "types": [], "paths": { - "hammerjs": ["hammerjs/v0"] + "hammerjs": ["hammerjs/v1"] }, "noEmit": true, "forceConsistentCasingInFileNames": true diff --git a/ion.rangeslider/v1/tsconfig.json b/ion.rangeslider/v1/tsconfig.json index 7e3532f344..2460539a3f 100644 --- a/ion.rangeslider/v1/tsconfig.json +++ b/ion.rangeslider/v1/tsconfig.json @@ -11,7 +11,7 @@ ], "types": [], "paths": { - "ion.rangeslider": ["ion.rangeslider/v0"] + "ion.rangeslider": ["ion.rangeslider/v1"] }, "noEmit": true, "forceConsistentCasingInFileNames": true diff --git a/react-daterange-picker/package.json b/react-daterange-picker/package.json deleted file mode 100644 index 4c6d24a445..0000000000 --- a/react-daterange-picker/package.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "dependencies": { - "moment": ">=2.14.0" - } -} \ No newline at end of file diff --git a/react-daterange-picker/tsconfig.json b/react-daterange-picker/tsconfig.json index 5d13fe1e1c..ef3f5b7c35 100644 --- a/react-daterange-picker/tsconfig.json +++ b/react-daterange-picker/tsconfig.json @@ -9,12 +9,6 @@ "typeRoots": [ "../" ], - "paths": { - "*": [ - "*", - "react-daterange-picker/node_modules/*" - ] - }, "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true, From d22bd22f74ca1d22584b097836bd717555273e76 Mon Sep 17 00:00:00 2001 From: Andy Date: Tue, 10 Jan 2017 08:13:39 -0800 Subject: [PATCH 048/100] Make version parse-able. (#13904) --- hypertext-application-language/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hypertext-application-language/index.d.ts b/hypertext-application-language/index.d.ts index 7834a81faf..111356c1ee 100644 --- a/hypertext-application-language/index.d.ts +++ b/hypertext-application-language/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for Hypertext Application Language Draft 6 +// Type definitions for Hypertext Application Language Draft 6.0 // Project: https://tools.ietf.org/html/draft-kelly-json-hal-06 // Definitions by: Maks3w // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped From 12302a50e5b2163a8f187d49b1b696f5f65009ff Mon Sep 17 00:00:00 2001 From: Jough Dempsey Date: Tue, 10 Jan 2017 10:20:48 -0600 Subject: [PATCH 049/100] Change $inject type from string[] to ReadonlyArray It may be prudent to make injected dependencies immutable since we can't Object.freeze() or use the Readonly interface for our dependency array if $inject only accepts a mutable array of strings. --- angular/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/angular/index.d.ts b/angular/index.d.ts index 4a9445962d..b07ae7d5f9 100644 --- a/angular/index.d.ts +++ b/angular/index.d.ts @@ -10,7 +10,7 @@ declare var angular: angular.IAngularStatic; // Support for painless dependency injection declare global { interface Function { - $inject?: string[] | ReadonlyArray; + $inject?: ReadonlyArray; } } From ffabe14406652099f76cd93bb54e71676a9bc333 Mon Sep 17 00:00:00 2001 From: Markus Chmelar Date: Tue, 10 Jan 2017 17:51:31 +0100 Subject: [PATCH 050/100] Add `closeOnClick` to PopupOptions --- leaflet/index.d.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/leaflet/index.d.ts b/leaflet/index.d.ts index 3e50ded6fd..93cceb3425 100644 --- a/leaflet/index.d.ts +++ b/leaflet/index.d.ts @@ -1046,6 +1046,7 @@ declare namespace L { keepInView?: boolean; closeButton?: boolean; autoClose?: boolean; + closeOnClick?: boolean; } type Content = string | HTMLElement; From 92933ca5fc28c42957d83ca013ac717c75c64252 Mon Sep 17 00:00:00 2001 From: Shu Sam Chen Date: Tue, 10 Jan 2017 17:22:16 +0000 Subject: [PATCH 051/100] Added missing methods to Body. --- p2/index.d.ts | 5 ++++- p2/p2-tests.ts | 6 ++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/p2/index.d.ts b/p2/index.d.ts index 5fb85052e6..e9b8b79054 100644 --- a/p2/index.d.ts +++ b/p2/index.d.ts @@ -520,7 +520,10 @@ declare namespace p2 { addShape(shape: Shape, offset?: number[], angle?: number): void; removeShape(shape: Shape): boolean; updateMassProperties(): void; - applyForce(force: number[], worldPoint: number[]): void; + applyForce(force: number[], relativePoint?: number[]): void; + applyForceLocal(localforce: number[], localPoint?: number[]): void; + applyImpulse(impulse: number[], relativePoint?: number[]): void; + applyImpulseLocal(impulse: number[], localPoint?: number[]): void; toLocalFrame(out: number[], worldPoint: number[]): void; toWorldFrame(out: number[], localPoint: number[]): void; fromPolygon(path: number[][], options?: { diff --git a/p2/p2-tests.ts b/p2/p2-tests.ts index bdad71b906..0579a880b2 100644 --- a/p2/p2-tests.ts +++ b/p2/p2-tests.ts @@ -31,6 +31,12 @@ world.addBody(groundBody); // This is done using a fixed time step size. var timeStep = 1 / 60; // seconds +// Apply a force to the circle +circleBody.applyForce([10, 0]); + +// Apply an impulse to the circle +circleBody.applyImpulse([0, 50]); + // The "Game loop". Could be replaced by, for example, requestAnimationFrame. setInterval(function(){ From d7f3e8b418ce1a51ddfaacbc0ef5e18f3045b56f Mon Sep 17 00:00:00 2001 From: Andy Date: Tue, 10 Jan 2017 10:19:54 -0800 Subject: [PATCH 052/100] Make version number parse-able (#13910) --- iscroll/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/iscroll/index.d.ts b/iscroll/index.d.ts index b4a8d62763..cfe1824643 100644 --- a/iscroll/index.d.ts +++ b/iscroll/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for iScroll 5 +// Type definitions for iScroll 5.0 // Project: http://cubiq.org/iscroll-5-ready-for-beta-test // Definitions by: Christiaan Rakowski // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped From 24906647e66a58d0cc0f937dafa40f627e05beac Mon Sep 17 00:00:00 2001 From: Brian Caruso Date: Tue, 10 Jan 2017 10:15:24 -0800 Subject: [PATCH 053/100] Update auth0-lock to v10.9.1 API --- auth0-lock/auth0-lock-tests.ts | 26 +++++++++++++++++++++++++- auth0-lock/index.d.ts | 26 +++++++++++++++++++++++--- 2 files changed, 48 insertions(+), 4 deletions(-) diff --git a/auth0-lock/auth0-lock-tests.ts b/auth0-lock/auth0-lock-tests.ts index cd51950c6a..d0a9231a57 100644 --- a/auth0-lock/auth0-lock-tests.ts +++ b/auth0-lock/auth0-lock-tests.ts @@ -1,5 +1,5 @@ /// - +/// const CLIENT_ID = "YOUR_AUTH0_APP_CLIENTID"; const DOMAIN = "YOUR_DOMAIN_AT.auth0.com"; @@ -10,6 +10,30 @@ lock.show(); lock.hide(); lock.logout(() => {}); +// Show supports UI arguments + +var showOptions : Auth0LockShowOptions = { + allowedConnections: [ "twitter", "facebook" ], + autoclose: false, + autofocus: true, + closable: true, + container: "somediv", + flashMessage: { + type: "error", + text: "an error has occurred" + }, + language: "en", + popupOptions: { + width: 100, + height: 400, + left: 200, + top: 200 + }, + rememberLastLogin: false +}; + +lock.show(showOptions); + // The examples below are lifted from auth0-lock documentation on Github // "on" event-driven example diff --git a/auth0-lock/index.d.ts b/auth0-lock/index.d.ts index e2964d287c..4593b4e32a 100644 --- a/auth0-lock/index.d.ts +++ b/auth0-lock/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for auth0-lock v10.0.1 +// Type definitions for auth0-lock v10.9.1 // Project: http://auth0.com // Definitions by: Brian Caruso // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped @@ -103,13 +103,33 @@ interface Auth0LockConstructorOptions { usernameStyle?: string; } +interface Auth0LockFlashMessageOptions { + type: "success" | "error", + text: string; +} + +interface Auth0LockShowOptions { + allowedConnections?: string[]; + autoclose?: boolean; + autofocus?: boolean; + avatar?: Auth0LockAvatarOptions; + closable?: boolean; + container?: string; + flashMessage?: Auth0LockFlashMessageOptions; + language?: string; + languageDictionary?: any; + popupOptions?: Auth0LockPopupOptions; + rememberLastLogin?: boolean; +} + interface Auth0LockStatic { new (clientId: string, domain: string, options?: Auth0LockConstructorOptions): Auth0LockStatic; - getProfile(token: string, callback: (error: Auth0Error, profile: Auth0UserProfile) => void) : void; + // deprecated + getProfile(token: string, callback: (error: Auth0Error, profile: Auth0UserProfile) => void) : void; getUserInfo(token: string, callback: (error: Auth0Error, profile: Auth0UserProfile) => void) : void; - show(): void; + show(options?: Auth0LockShowOptions): void; hide(): void; logout(query: any): void; From 904bc106f104aed142b1eeefc9c3da7441152b08 Mon Sep 17 00:00:00 2001 From: Brian Caruso Date: Tue, 10 Jan 2017 10:47:17 -0800 Subject: [PATCH 054/100] Address tslint issues --- auth0-lock/index.d.ts | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/auth0-lock/index.d.ts b/auth0-lock/index.d.ts index 4593b4e32a..32e473b84a 100644 --- a/auth0-lock/index.d.ts +++ b/auth0-lock/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for auth0-lock v10.9.1 +// Type definitions for auth0-lock 10.9 // Project: http://auth0.com // Definitions by: Brian Caruso // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped @@ -104,7 +104,7 @@ interface Auth0LockConstructorOptions { } interface Auth0LockFlashMessageOptions { - type: "success" | "error", + type: "success" | "error"; text: string; } @@ -126,19 +126,17 @@ interface Auth0LockStatic { new (clientId: string, domain: string, options?: Auth0LockConstructorOptions): Auth0LockStatic; // deprecated - getProfile(token: string, callback: (error: Auth0Error, profile: Auth0UserProfile) => void) : void; - getUserInfo(token: string, callback: (error: Auth0Error, profile: Auth0UserProfile) => void) : void; + getProfile(token: string, callback: (error: Auth0Error, profile: Auth0UserProfile) => void): void; + getUserInfo(token: string, callback: (error: Auth0Error, profile: Auth0UserProfile) => void): void; show(options?: Auth0LockShowOptions): void; hide(): void; logout(query: any): void; - on(event: "show", callback: () => void) : void; - on(event: "hide", callback: () => void) : void; - on(event: "unrecoverable_error", callback: (error: Auth0Error) => void) : void; - on(event: "authorization_error", callback: (error: Auth0Error) => void) : void; - on(event: "authenticated", callback: (authResult: any) => void) : void; - on(event: string, callback: (...args: any[]) => void) : void; + on(event: "show" | "hide", callback: () => void): void; + on(event: "unrecoverable_error" | "authorization_error", callback: (error: Auth0Error) => void): void; + on(event: "authenticated", callback: (authResult: any) => void): void; + on(event: string, callback: (...args: any[]) => void): void; } declare var Auth0Lock: Auth0LockStatic; From dd56cf09c456fc0f9f133107d8d6a3f8bc3dff13 Mon Sep 17 00:00:00 2001 From: JD-Robbs Date: Tue, 10 Jan 2017 19:09:12 +0000 Subject: [PATCH 055/100] Create tslint.json --- sha1/tslint.json | 1 + 1 file changed, 1 insertion(+) create mode 100644 sha1/tslint.json diff --git a/sha1/tslint.json b/sha1/tslint.json new file mode 100644 index 0000000000..377cc837d4 --- /dev/null +++ b/sha1/tslint.json @@ -0,0 +1 @@ +{ "extends": "../tslint.json" } From 3a5255b8f25123254ea7948070497253fe7cef54 Mon Sep 17 00:00:00 2001 From: JD-Robbs Date: Tue, 10 Jan 2017 19:14:57 +0000 Subject: [PATCH 056/100] Update index.d.ts --- sha1/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sha1/index.d.ts b/sha1/index.d.ts index c792f7d585..91a4820973 100644 --- a/sha1/index.d.ts +++ b/sha1/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for sha1 v1.1.1 +// Type definitions for sha1 v1.1 // Project: https://github.com/pvorb/node-sha1 // Definitions by: Bill Sourour // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped From 6aacd98e182240c38fab38ba77364e19cc5fb60f Mon Sep 17 00:00:00 2001 From: JD-Robbs Date: Tue, 10 Jan 2017 19:18:26 +0000 Subject: [PATCH 057/100] Update index.d.ts --- sha1/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sha1/index.d.ts b/sha1/index.d.ts index 91a4820973..81b2202dc3 100644 --- a/sha1/index.d.ts +++ b/sha1/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for sha1 v1.1 +// Type definitions for sha1 1.1 // Project: https://github.com/pvorb/node-sha1 // Definitions by: Bill Sourour // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped From 60fb8a10230169a92e9fd0db443d596f620bf2be Mon Sep 17 00:00:00 2001 From: Robert Buehler Date: Tue, 10 Jan 2017 13:30:44 -0600 Subject: [PATCH 058/100] Added dir to JSZipFileOptions. --- jszip/index.d.ts | 1 + jszip/jszip-tests.ts | 1 + 2 files changed, 2 insertions(+) diff --git a/jszip/index.d.ts b/jszip/index.d.ts index 46fe0f870c..be9b053d43 100644 --- a/jszip/index.d.ts +++ b/jszip/index.d.ts @@ -148,6 +148,7 @@ interface JSZipFileOptions { comment?: string; optimizedBinaryString?: boolean; createFolders?: boolean; + dir?: boolean; } interface JSZipObjectOptions { diff --git a/jszip/jszip-tests.ts b/jszip/jszip-tests.ts index da6366fbcb..f7a4b9f10f 100644 --- a/jszip/jszip-tests.ts +++ b/jszip/jszip-tests.ts @@ -9,6 +9,7 @@ var SEVERITY = { function createTestZip(): JSZip { var zip = new JSZip(); zip.file("test.txt", "test string"); + zip.file("test", null, { dir: true }); zip.file("test/test.txt", "test string"); return zip } From 28d96a9ec99af437e09c7357bf065f9848af0ea8 Mon Sep 17 00:00:00 2001 From: Alexandre Date: Tue, 10 Jan 2017 19:31:57 +0000 Subject: [PATCH 059/100] Fix redux-form typings (#13867) * Patch FormErrors and FormWarnings * Allow passing ReactElement values to FormErrors and FormWarnings * Add typescript version to the end of the header --- redux-form/index.d.ts | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/redux-form/index.d.ts b/redux-form/index.d.ts index 4c73f3e489..590fe3a633 100644 --- a/redux-form/index.d.ts +++ b/redux-form/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/erikras/redux-form // Definitions by: Carson Full , Daniel Lytkin // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 /// @@ -16,9 +17,13 @@ export type FieldType = 'Field' | 'FieldArray'; export type DataShape = {[fieldName:string]: FieldValue}; -export type FormErrors = FormData & { _error?: string }; +export type FormErrors = { + [P in keyof FormData]?: React.ReactElement | string; +} & { _error?: string }; -export type FormWarnings = FormData & { _warning?: string }; +export type FormWarnings = { + [P in keyof FormData]?: React.ReactElement | string; +} & { _warning?: string }; /** * A component class or stateless function component. From c21893d61a9286cf7ffbe69c7d2c1677257d444a Mon Sep 17 00:00:00 2001 From: Andy Hanson Date: Tue, 10 Jan 2017 11:44:39 -0800 Subject: [PATCH 060/100] Update expr-eval for new linter * Now warns if we `export =` a namespace * `unified-signatures` no longer complains when static and non-static methods share a name * Also change `values` paramters to be of type `Values` rather than `Value` --- expr-eval/index.d.ts | 52 ++++++++++++++++++++------------------------ 1 file changed, 23 insertions(+), 29 deletions(-) diff --git a/expr-eval/index.d.ts b/expr-eval/index.d.ts index 7f72eb6101..cab8333186 100644 --- a/expr-eval/index.d.ts +++ b/expr-eval/index.d.ts @@ -3,35 +3,29 @@ // Definitions by: Connor Peet // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -declare namespace exprEval { - type Value = number - | string - | ((...args: Value[]) => Value) - | { [propertyName: string]: Value }; +type Value = number + | string + | ((...args: Value[]) => Value) + | { [propertyName: string]: Value }; - interface Values { - [propertyName: string]: Value; - } - - export class Parser { - constructor(options?: { allowMemberAccess?: boolean }); - parse(expression: string): Expression; - evaluate(expression: string, values?: Value): number; - - // todo(connor4312): tslint is disabled on the following two lines, as - // thinks that the above instance methods are overloads for the static methods. - static parse(expression: string): Expression; // tslint:disable-line - static evaluate(expression: string, values?: Value): number; // tslint:disable-line - } - - export interface Expression { - simplify(values?: Values): Expression; - evaluate(values?: Values): number; - substitute(values: Values): Expression; - symbols(): string[]; - variables(): string[]; - toJSFunction(params: string, values?: Values): (...args: Value[]) => number; - } +interface Values { + [propertyName: string]: Value; } -export = exprEval; +export class Parser { + constructor(options?: { allowMemberAccess?: boolean }); + parse(expression: string): Expression; + evaluate(expression: string, values?: Values): number; + + static parse(expression: string): Expression; + static evaluate(expression: string, values?: Values): number; +} + +export interface Expression { + simplify(values?: Values): Expression; + evaluate(values?: Values): number; + substitute(values: Values): Expression; + symbols(): string[]; + variables(): string[]; + toJSFunction(params: string, values?: Values): (...args: Value[]) => number; +} From 74bb64e32e2d79a956d1504b634d066f98f5ed25 Mon Sep 17 00:00:00 2001 From: Brian Caruso Date: Tue, 10 Jan 2017 12:27:32 -0800 Subject: [PATCH 061/100] Fix argument list for options object to 'show()' function --- auth0-lock/auth0-lock-tests.ts | 21 ++++++++++----------- auth0-lock/index.d.ts | 12 ++++-------- 2 files changed, 14 insertions(+), 19 deletions(-) diff --git a/auth0-lock/auth0-lock-tests.ts b/auth0-lock/auth0-lock-tests.ts index d0a9231a57..deb046f3e7 100644 --- a/auth0-lock/auth0-lock-tests.ts +++ b/auth0-lock/auth0-lock-tests.ts @@ -14,21 +14,20 @@ lock.logout(() => {}); var showOptions : Auth0LockShowOptions = { allowedConnections: [ "twitter", "facebook" ], - autoclose: false, - autofocus: true, - closable: true, - container: "somediv", + allowSignUp: true, + allowForgotPassword: false, + auth: { + params: { state: "foo" }, + redirect: true, + redirectUrl: "some url", + responseType: "token", + sso: true + }, + initialScreen: "login", flashMessage: { type: "error", text: "an error has occurred" }, - language: "en", - popupOptions: { - width: 100, - height: 400, - left: 200, - top: 200 - }, rememberLastLogin: false }; diff --git a/auth0-lock/index.d.ts b/auth0-lock/index.d.ts index 32e473b84a..51fa67e401 100644 --- a/auth0-lock/index.d.ts +++ b/auth0-lock/index.d.ts @@ -110,15 +110,11 @@ interface Auth0LockFlashMessageOptions { interface Auth0LockShowOptions { allowedConnections?: string[]; - autoclose?: boolean; - autofocus?: boolean; - avatar?: Auth0LockAvatarOptions; - closable?: boolean; - container?: string; + allowSignUp?: boolean; + allowForgotPassword?: boolean; + auth?: Auth0LockAuthOptions; + initialScreen?: "login" | "signUp" | "forgotPassword"; flashMessage?: Auth0LockFlashMessageOptions; - language?: string; - languageDictionary?: any; - popupOptions?: Auth0LockPopupOptions; rememberLastLogin?: boolean; } From 0c55c305bef988cc5d2dab4953126d1712ddc1ba Mon Sep 17 00:00:00 2001 From: Andy Hanson Date: Tue, 10 Jan 2017 12:36:01 -0800 Subject: [PATCH 062/100] tar: Add "noProprietary" header --- tar/index.d.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/tar/index.d.ts b/tar/index.d.ts index 3b2a6d176b..4b62578290 100644 --- a/tar/index.d.ts +++ b/tar/index.d.ts @@ -14,6 +14,7 @@ import stream = require("stream"); export interface HeaderProperties { path?: string; mode?: number; + noProprietary?: boolean; uid?: number; gid?: number; size?: number; From 5642676697a742f33118383184afc47264a70691 Mon Sep 17 00:00:00 2001 From: Brian Caruso Date: Tue, 10 Jan 2017 12:49:44 -0800 Subject: [PATCH 063/100] Add missing 'allowLogin' parameter to show() options. Alphabetize show() options in type definition. --- auth0-lock/index.d.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/auth0-lock/index.d.ts b/auth0-lock/index.d.ts index 51fa67e401..fc9a047115 100644 --- a/auth0-lock/index.d.ts +++ b/auth0-lock/index.d.ts @@ -110,8 +110,9 @@ interface Auth0LockFlashMessageOptions { interface Auth0LockShowOptions { allowedConnections?: string[]; - allowSignUp?: boolean; allowForgotPassword?: boolean; + allowLogin?: boolean; + allowSignUp?: boolean; auth?: Auth0LockAuthOptions; initialScreen?: "login" | "signUp" | "forgotPassword"; flashMessage?: Auth0LockFlashMessageOptions; From 88b843a4586377b05bce4f63e2a10493beeca6ad Mon Sep 17 00:00:00 2001 From: Alexander Efimov Date: Wed, 11 Jan 2017 00:12:27 +0300 Subject: [PATCH 064/100] Adding geolib definition with fixed signatures in file taken from Vladimir Venegas. Tests are also added. (#13886) Adding geolib definition with fixed signatures in file taken from Vladimir Venegas. Tests are also added. --- geolib/geolib-tests.ts | 201 +++++++++++++++++++++++++++++++++++++++++ geolib/index.d.ts | 199 ++++++++++++++++++++++++++++++++++++++++ geolib/tsconfig.json | 20 ++++ geolib/tslint.json | 1 + 4 files changed, 421 insertions(+) create mode 100644 geolib/geolib-tests.ts create mode 100644 geolib/index.d.ts create mode 100644 geolib/tsconfig.json create mode 100644 geolib/tslint.json diff --git a/geolib/geolib-tests.ts b/geolib/geolib-tests.ts new file mode 100644 index 0000000000..5386bf730b --- /dev/null +++ b/geolib/geolib-tests.ts @@ -0,0 +1,201 @@ +import "geolib"; +import PositionAsDecimal = geolib.PositionAsDecimal; +import CompassDirection = geolib.CompassDirection; +import Distance = geolib.Distance; +import Bound = geolib.Bound; + +let dist: number = geolib.getDistance( + {latitude: 51.5103, longitude: 7.49347}, + {latitude: "51° 31' N", longitude: "7° 28' E"} +); + +dist = geolib.getDistance( + {latitude: 51.5103, longitude: 7.49347}, + {latitude: "51° 31' N", longitude: "7° 28' E"} +); + +dist = geolib.getDistance( + {latitude: 51.5103, longitude: 7.49347}, + {latitude: "51° 31' N", longitude: "7° 28' E"}, + 1, + 1 +); + +// Working with W3C Geolocation API +navigator.geolocation.getCurrentPosition( + function(position) { + alert('You are ' + geolib.getDistance(position.coords, { + latitude: 51.525, + longitude: 7.4575 + }) + ' meters away from 51.525, 7.4575'); + }, + function() { + alert('Position could not be determined.') + }, + { + enableHighAccuracy: true + } +); + + +dist = geolib.getDistanceSimple( + {latitude: 51.5103, longitude: 7.49347}, + {latitude: "51° 31' N", longitude: "7° 28' E"} +); + +dist = geolib.getDistanceSimple( + {latitude: 51.5103, longitude: 7.49347}, + {latitude: "51° 31' N", longitude: "7° 28' E"}, + 1 +); + +let posAsDecimal: PositionAsDecimal = geolib.getCenter([ + {latitude: 52.516272, longitude: 13.377722}, + {latitude: 51.515, longitude: 7.453619}, + {latitude: 51.503333, longitude: -0.119722} +]); + +posAsDecimal = geolib.getCenter([ + {latitude: 52.516272, longitude: 13.377722}, + {latitude: 51.515, longitude: 7.453619}, + {latitude: 51.503333, longitude: -0.119722} +]); + +posAsDecimal = geolib.getCenterOfBounds([ + {latitude: 52.516272, longitude: 13.377722}, + {latitude: 51.515, longitude: 7.453619}, + {latitude: 51.503333, longitude: -0.119722}, + {latitude: 51.503333, longitude: -1.119722} +]); + + + +let bound: Bound = geolib.getBounds([ + {latitude: 52.516272, longitude: 13.377722, elevation: 1}, + {latitude: 51.515, longitude: 7.453619, elevation: 1}, + {latitude: 51.503333, longitude: -0.119722, elevation: 1}]); + +let isInside: boolean = geolib.isPointInside( + {latitude: 51.5125, longitude: 7.485}, + [ + {latitude: 51.50, longitude: 7.40}, + {latitude: 51.555, longitude: 7.40}, + {latitude: 51.555, longitude: 7.625}, + {latitude: 51.5125, longitude: 7.625} + ] +); // -> true + +// checks if 51.525, 7.4575 is within a radius of 5km from 51.5175, 7.4678 +let boolResult: boolean = geolib.isPointInCircle( + {latitude: 51.525, longitude: 7.4575}, + {latitude: 51.5175, longitude: 7.4678}, + 5000 +); + +let bearing: number = geolib.getRhumbLineBearing( + {latitude: 52.518611, longitude: 13.408056}, + {latitude: 51.519475, longitude: 7.46694444} +); + +bearing = geolib.getBearing( + {latitude: 52.518611, longitude: 13.408056}, + {latitude: 51.519475, longitude: 7.46694444} +); + +let compassDirection: CompassDirection = geolib.getCompassDirection( + {latitude: 52.518611, longitude: 13.408056}, + {latitude: 51.519475, longitude: 7.46694444} +); + +compassDirection = geolib.getCompassDirection( + {latitude: 52.518611, longitude: 13.408056}, + {latitude: 51.519475, longitude: 7.46694444}, + 'circle' +); + +// coords array +let distanceArray: Distance[] = geolib.orderByDistance({latitude: 51.515, longitude: 7.453619}, [ + {latitude: 52.516272, longitude: 13.377722}, + {latitude: 51.518, longitude: 7.45425}, + {latitude: 51.503333, longitude: -0.119722} +]); + +// coords object +distanceArray = geolib.orderByDistance({latitude: 51.515, longitude: 7.453619}, [ + {latitude: 52.516272, longitude: 13.377722}, + {latitude: 51.518, longitude: 7.45425}, + {latitude: 51.503333, longitude: -0.119722} +]); + + +// in this case set offset to 1 otherwise the nearest point will always be your reference point +let posAsDecimalArray: Distance[] = geolib.findNearest( + {latitude: 51.515, longitude: 7.453619}, + [ + {latitude: 52.516272, longitude: 13.377722}, + {latitude: 51.515, longitude: 7.453619}, + {latitude: 51.503333, longitude: -0.119722}, + {latitude: 55.751667, longitude: 37.617778}, + {latitude: 48.8583, longitude: 2.2945}, + {latitude: 59.3275, longitude: 18.0675}, + {latitude: 59.916911, longitude: 10.727567} + ], 1); + + +// Calculate distance from Berlin via Dortmund to London +dist = geolib.getPathLength([ + {latitude: 52.516272, longitude: 13.377722}, // Berlin + {latitude: 51.515, longitude: 7.453619}, // Dortmund + {latitude: 51.503333, longitude: -0.119722} // London +]); // -> 945235 + +let speed: number = geolib.getSpeed( + [ + {latitude: 51.567294, longitude: 7.38896, time: 1360231200880}, + {latitude: 52.54944, longitude: 13.468509, time: 1360245600880} + ], + {unit: 'mph'} +); // -> 66.9408 (mph) + +speed= geolib.getSpeed( + [ + {latitude: 51.567294, longitude: 7.38896, time: 1360231200880}, + {latitude: 52.54944, longitude: 13.468509, time: 1360245600880} + ] +); // -> 66.9408 (mph) + +let point1 = {latitude: 0.5, longitude: 0}; +let point2 = {latitude: 0, longitude: 10}; +let point3 = {latitude: 0, longitude: 15.5}; +let start = {latitude: 0, longitude: 0}; +let end = {latitude: 0, longitude: 15}; + +let isInLine1 = geolib.isPointInLine(point1, start, end) //-> false; +let isInLine2 = geolib.isPointInLine(point2, start, end) //-> true; +let isInLine3 = geolib.isPointInLine(point3, start, end) //-> false; + + +let convertResult: number = geolib.convertUnit('km', 14213, 2) // -> 14,21 +convertResult = geolib.convertUnit('km', 14213) // -> 14,21 + +let result: number = geolib.sexagesimal2decimal("51° 29' 46\" N") + +let resultString: string = geolib.decimal2sexagesimal(51.49611111); // -> 51° 29' 46.00 + +result = geolib.latitude({lat: 51.49611, lng: 7.38896}); // -> 51.49611 +result = geolib.longitude({lat: 51.49611, lng: 7.38896}); // -> 7.38896 + +result = geolib.useDecimal("51° 29' 46\" N"); // -> 51.59611111 +result = geolib.useDecimal(51.59611111) // -> 51.59611111 + +result = geolib.elevation({lat: 51.49611, lng: 7.38896}); + +let initialPoint = {latitude: 51.516272, longitude: 0.45425} +let radius = 100; +dist = 1234; +bearing = 45; + + +posAsDecimal = geolib.computeDestinationPoint(initialPoint, dist, bearing); +posAsDecimal = geolib.computeDestinationPoint(initialPoint, dist, bearing, radius); +// -> {"latitude":51.52411853234181,"longitude":0.4668623365950795} diff --git a/geolib/index.d.ts b/geolib/index.d.ts new file mode 100644 index 0000000000..69a6c99353 --- /dev/null +++ b/geolib/index.d.ts @@ -0,0 +1,199 @@ +// Type definitions for geolib 2.0 +// Project: https://github.com/manuelbieh/Geolib +// Definitions by: Vladimir Venegas , Alex Efimov +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +declare namespace geolib { + export interface PositionAsDecimal { + latitude: number; + longitude: number; + } + + export interface PositionAsSexadecimal { + latitude: string; + longitude: string; + } + + export interface PositionWithElevation extends PositionAsDecimal { + elevation?: number; + } + + export interface PositionInTime extends PositionAsDecimal { + time: number; + } + + export interface Bound { + minLat: number; + maxLat: number; + minLng: number; + maxLng: number; + minElev?: number; + maxElev?: number; + } + + export interface CompassDirection { + rough: string; + exact: string; + } + + export interface Distance { + latitude: number; + longitude: number; + distance: number; + key: string; + } + + export interface SpeedOption { + unit: string; + } + + /** Calculates the distance between two geo coordinates + * + * Return value is always float and represents the distance in meters. + */ + function getDistance(start: PositionAsDecimal|PositionAsSexadecimal, end: PositionAsDecimal|PositionAsSexadecimal, accuracy?: number, precision?: number): number; + + /** Calculates the distance between two geo coordinates but this method is far more inaccurate as compared to getDistance. + * It can take up 2 to 3 arguments. start, end and accuracy can be defined in the same as in getDistance. + * + * Return value is always float that represents the distance in meters. + */ + function getDistanceSimple(start: PositionAsDecimal|PositionAsSexadecimal, end: PositionAsDecimal|PositionAsSexadecimal, accuracy?: number): number; + + + /** Calculates the geographical center of all points in a collection of geo coordinates + * Takes an object or array of coordinates and calculates the center of it. + */ + function getCenter(coords: PositionAsDecimal[]): PositionAsDecimal; + + + /** Calculates the center of the bounds of geo coordinates. Takes an array of coordinates, + * calculate the border of those, and gives back the center of that rectangle. On polygons + * like political borders (eg. states), this may gives a closer result to human expectation, + * than getCenter, because that function can be disturbed by uneven distribution of point in + * different sides. Imagine the US state Oklahoma: getCenter on that gives a southern point, + * because the southern border contains a lot more nodes, than the others. + */ + function getCenterOfBounds(coords: PositionAsDecimal[]): PositionAsDecimal; + + + /** Calculates the bounds of geo coordinates. + * + * Returns maximum and minimum, latitude, longitude, and elevation (if provided) in form of an object + */ + function getBounds(coords: PositionWithElevation[]): Bound; + + + /** Checks whether a point is inside of a polygon or not. Note: the polygon coords must be in correct order! + * + * Returns true or false + */ + function isPointInside(latlng: PositionAsDecimal, polygon: PositionAsDecimal[]): boolean; + + + /** Similar to is point inside: checks whether a point is inside of a circle or not. + * + * Returns true or false + */ + function isPointInCircle(latlng: PositionAsDecimal, center: PositionAsDecimal, radius: number): boolean; + + + /** Gets rhumb line bearing of two points. Find out about the difference between rhumb line and great circle bearing on Wikipedia. + * Rhumb line should be fine in most cases: http://en.wikipedia.org/wiki/Rhumb_line#General_and_mathematical_description Function + * is heavily based on Doug Vanderweide's great PHP version (licensed under GPL 3.0) + * http://www.dougv.com/2009/07/13/calculating-the-bearing-and-compass-rose-direction-between-two-latitude-longitude-coordinates-in-php/ + * + * Returns calculated bearing as integer. + */ + function getRhumbLineBearing(originLL: PositionAsDecimal, destLL: PositionAsDecimal): number; + + + /** Gets great circle bearing of two points. See description of getRhumbLineBearing for more information. + * + * Returns calculated bearing as integer + */ + function getBearing(originLL: PositionAsDecimal, destLL: PositionAsDecimal): number; + + + /** Gets the compass direction from an origin coordinate (originLL) to a destination coordinate (destLL). + * Bearing mode. Can be either circle or rhumbline (default). + * + * Returns an object with a rough (NESW) and an exact direction (NNE, NE, ENE, E, ESE, etc). + */ + function getCompassDirection(originLL: PositionAsDecimal, destLL: PositionAsDecimal, bearingMode?: string): CompassDirection; + + + /** Sorts an object or array of coords by distance from a reference coordinate */ + function orderByDistance(latlng: PositionAsDecimal, coords: PositionAsDecimal[]): Distance[]; + + + /** Finds the nearest coordinate to a reference coordinate. */ + function findNearest(latlng: PositionAsDecimal, coords: PositionAsDecimal[], offset?: number, limit?: number): Distance[]; + + + /** Calculates the length of a collection of coordinates. + * + * Returns the length of the path in meters */ + function getPathLength(coords: PositionAsDecimal[]): number; + + /** Calculates the speed between two points within a given time span. + * + * Returns the speed in options.unit (default is km/h). + */ + function getSpeed(coords: PositionInTime[], option?: SpeedOption): number; + + + /** Calculates if given point lies in a line formed by start and end */ + function isPointInLine(point: PositionAsDecimal, start: PositionAsDecimal, end: PositionAsDecimal): boolean; + + + /** Converts a given distance (in meters) to another unit. + * distance distance to be converted (source must be in meter). unit can be one of: + * - m (meter) + * - km (kilometers) + * - cm (centimeters) + * - mm (millimeters) + * - mi (miles) + * - sm (seamiles) + * - ft (foot) + * - in (inch) + * - yd (yards) + */ + function convertUnit(unit: string, distance: number, round?: number): number; + + + /** Converts a sexagesimal coordinate to decimal format */ + function sexagesimal2decimal(coord: string): number; + + + /** Converts a decimal coordinate to sexagesimal format */ + function decimal2sexagesimal(coord: number): string; + + /** Returns the latitude for a given point and converts it to decimal. + * Works with: latitude, lat, 1 (GeoJSON array) + */ + function latitude(latlng: any): number; + + /** Returns the longitude for a given point and converts it to decimal. + * Works with: longitude, lng, lon, 0 (GeoJSON array) + */ + function longitude(latlng: any): number; + + /** Returns the elevation for a given point and converts it to decimal. + * Works with: elevation, elev, alt, altitude, 2 (GeoJSON array) + */ + function elevation(latlng: any): number; + + + /** Checks if a coordinate is already in decimal format and, if not, converts it to */ + function useDecimal(latlng: string|number): number; + + + /** Computes the destination point given an initial point, a distance (in meters) and a bearing (in degrees). + * If no radius is given it defaults to the mean earth radius of 6371000 meter. + * + * Returns an object: `{"latitude": destLat, "longitude": destLng}` + * (Attention: this formula is not *100%* accurate (but very close though)) + */ + function computeDestinationPoint(start: PositionAsDecimal, distance: number, bearing: number, radius?: number): PositionAsDecimal; +} diff --git a/geolib/tsconfig.json b/geolib/tsconfig.json new file mode 100644 index 0000000000..aca799d836 --- /dev/null +++ b/geolib/tsconfig.json @@ -0,0 +1,20 @@ +{ + "compilerOptions": { + "module": "commonjs", + "target": "es6", + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "geolib-tests.ts" + ] +} diff --git a/geolib/tslint.json b/geolib/tslint.json new file mode 100644 index 0000000000..377cc837d4 --- /dev/null +++ b/geolib/tslint.json @@ -0,0 +1 @@ +{ "extends": "../tslint.json" } From cfc5441a76bc3f54686bace707bc85bc15d9be80 Mon Sep 17 00:00:00 2001 From: Nelson Morais Date: Tue, 10 Jan 2017 22:51:25 +0100 Subject: [PATCH 065/100] Update config to support adal 1.0.13 settings (#13871) The instance setting was missing and is required if you need to connect to other instances (like China) --- adal/index.d.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/adal/index.d.ts b/adal/index.d.ts index a896d687ec..abff003e97 100644 --- a/adal/index.d.ts +++ b/adal/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for ADAL.JS 1.0.8 +// Type definitions for ADAL.JS 1.0.13 // Project: https://github.com/AzureAD/azure-activedirectory-library-for-js // Definitions by: mmaitre314 // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped @@ -16,6 +16,7 @@ declare namespace adal { tenant?: string; clientId: string; redirectUri?: string; + instance?: string; cacheLocation?: string; displayCall?: (urlNavigate: string) => any; correlationId?: string; From 67cce773b5de14cd64856782c79cc9a9e392e8cc Mon Sep 17 00:00:00 2001 From: Rafael Salguero Iturrios Date: Tue, 10 Jan 2017 14:54:42 -0700 Subject: [PATCH 066/100] Added module definition (#13870) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add an optional extended description… --- leaflet-label/index.d.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/leaflet-label/index.d.ts b/leaflet-label/index.d.ts index 08be437e7a..ded3f798b9 100644 --- a/leaflet-label/index.d.ts +++ b/leaflet-label/index.d.ts @@ -79,3 +79,7 @@ declare namespace L { setOpacity(opacity: number): void; } } + +declare module 'leaflet.label' { + export = L; +} From e4d1d4b9a0858f356d4ca264212b0f291a30557f Mon Sep 17 00:00:00 2001 From: Andy Date: Tue, 10 Jan 2017 14:20:05 -0800 Subject: [PATCH 067/100] leaflet-label: Use external module syntax (#13918) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add an optional extended description… --- leaflet-label/index.d.ts | 132 +++++++++++++++++++------------------- leaflet-label/tslint.json | 1 + 2 files changed, 67 insertions(+), 66 deletions(-) create mode 100644 leaflet-label/tslint.json diff --git a/leaflet-label/index.d.ts b/leaflet-label/index.d.ts index ded3f798b9..879f456e2d 100644 --- a/leaflet-label/index.d.ts +++ b/leaflet-label/index.d.ts @@ -1,85 +1,85 @@ -// Type definitions for Leaflet.label v0.2.1 +// Type definitions for Leaflet.label 0.2 // Project: https://github.com/Leaflet/Leaflet.label // Definitions by: Wim Looman // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped /// -declare namespace L { - export interface IconOptions { - labelAnchor?: Point; - } +declare global { + namespace L { + interface IconOptions { + labelAnchor?: Point; + } - export interface PathOptions { - labelAnchor?: Point; - } + interface PathOptions { + labelAnchor?: Point; + } - export interface CircleMarkerOptions { - labelAnchor?: Point; - } + interface CircleMarkerOptions { + labelAnchor?: Point; + } - export interface Marker { - showLabel(): Marker; - hideLabel(): Marker; - setLabelNoHide(noHide: boolean): void; - bindLabel(content: string, options?: LabelOptions): Marker; - unbindLabel(): Marker; - updateLabelContent(content: string): void; - getLabel(): Label; - setOpacity(opacity: number, labelHasSemiTransparency: boolean): void; - } + interface Marker { + showLabel(): Marker; + hideLabel(): Marker; + setLabelNoHide(noHide: boolean): void; + bindLabel(content: string, options?: LabelOptions): Marker; + unbindLabel(): Marker; + updateLabelContent(content: string): void; + getLabel(): Label; + setOpacity(opacity: number, labelHasSemiTransparency: boolean): void; + } - export interface CircleMarker { - showLabel(): CircleMarker; - hideLabel(): CircleMarker; - setLabelNoHide(noHide: boolean): void; - bindLabel(content: string, options?: LabelOptions): CircleMarker; - unbindLabel(): CircleMarker; - updateLabelContent(content: string): void; - getLabel(): Label; - } + interface CircleMarker { + showLabel(): CircleMarker; + hideLabel(): CircleMarker; + setLabelNoHide(noHide: boolean): void; + bindLabel(content: string, options?: LabelOptions): CircleMarker; + unbindLabel(): CircleMarker; + updateLabelContent(content: string): void; + getLabel(): Label; + } - export interface FeatureGroup { - clearLayers(): FeatureGroup; - bindLabel(content: string, options?: LabelOptions): FeatureGroup; - unbindLabel(): FeatureGroup; - updateLabelContent(content: string): FeatureGroup; - } + interface FeatureGroup { + clearLayers(): FeatureGroup; + bindLabel(content: string, options?: LabelOptions): FeatureGroup; + unbindLabel(): FeatureGroup; + updateLabelContent(content: string): FeatureGroup; + } - export interface Path { - bindLabel(content: string, options?: LabelOptions): Path; - unbindLabel(): Path; - updateLabelContent(content: string): void; - } + interface Path { + bindLabel(content: string, options?: LabelOptions): Path; + unbindLabel(): Path; + updateLabelContent(content: string): void; + } - export interface LabelOptions { - className?: string; - clickable?: boolean; - direction?: string; // 'left' | 'right' | 'auto'; - pane?: string; - noHide?: boolean; - offset?: Point; - opacity?: number; - zoomAnimation?: boolean; - } + interface LabelOptions { + className?: string; + clickable?: boolean; + direction?: string; // 'left' | 'right' | 'auto'; + pane?: string; + noHide?: boolean; + offset?: Point; + opacity?: number; + zoomAnimation?: boolean; + } - export interface LabelStatic extends ClassStatic { - new(options?: LabelOptions): Label; - } + interface LabelStatic extends ClassStatic { + new(options?: LabelOptions): Label; + } - export var Label: LabelStatic; + var Label: LabelStatic; - export interface Label extends IEventPowered