From 52ef0f1056eca09391b89699bb6bc9a442bab605 Mon Sep 17 00:00:00 2001 From: khai96_ Date: Thu, 17 May 2018 15:58:55 +0700 Subject: [PATCH 01/37] Ignore shrinkwrap.yaml --- .gitignore | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitignore b/.gitignore index c8e25cec8d..ac63b6f6b5 100644 --- a/.gitignore +++ b/.gitignore @@ -49,3 +49,6 @@ npm-debug.log # yarn yarn.lock + +# pnpm +shrinkwrap.yaml From 80987f14289ed45458c4ef2bcad5ab8baaeae151 Mon Sep 17 00:00:00 2001 From: khai96_ Date: Thu, 24 May 2018 00:41:03 +0700 Subject: [PATCH 02/37] Set type of symlink parameter 'type' to a union --- types/fs-extra/index.d.ts | 8 +++++--- types/node/index.d.ts | 6 ++++-- types/node/v8/index.d.ts | 6 ++++-- types/node/v9/index.d.ts | 6 ++++-- 4 files changed, 17 insertions(+), 9 deletions(-) diff --git a/types/fs-extra/index.d.ts b/types/fs-extra/index.d.ts index adf236955b..153b285ae1 100644 --- a/types/fs-extra/index.d.ts +++ b/types/fs-extra/index.d.ts @@ -10,7 +10,8 @@ /// -import { Stats } from "fs"; +import * as fs from "fs"; +import Stats = fs.Stats; export * from "fs"; @@ -206,8 +207,9 @@ export function rmdir(path: string | Buffer): Promise; export function stat(path: string | Buffer, callback: (err: NodeJS.ErrnoException, stats: Stats) => any): void; export function stat(path: string | Buffer): Promise; -export function symlink(srcpath: string | Buffer, dstpath: string | Buffer, type: string, callback: (err: NodeJS.ErrnoException) => void): void; -export function symlink(srcpath: string | Buffer, dstpath: string | Buffer, type?: string): Promise; +export function symlink(srcpath: string | Buffer, dstpath: string | Buffer, type: fs.symlink.Type | undefined, callback: (err: NodeJS.ErrnoException) => void): void; +export function symlink(srcpath: string | Buffer, dstpath: string | Buffer, callback: (err: NodeJS.ErrnoException) => void): void; +export function symlink(srcpath: string | Buffer, dstpath: string | Buffer, type?: fs.symlink.Type): Promise; export function truncate(path: string | Buffer, callback: (err: NodeJS.ErrnoException) => void): void; export function truncate(path: string | Buffer, len: number, callback: (err: NodeJS.ErrnoException) => void): void; diff --git a/types/node/index.d.ts b/types/node/index.d.ts index d964a41c43..14e4bf4a64 100644 --- a/types/node/index.d.ts +++ b/types/node/index.d.ts @@ -3461,7 +3461,7 @@ declare module "fs" { * @param type May be set to `'dir'`, `'file'`, or `'junction'` (default is `'file'`) and is only available on Windows (ignored on other platforms). * When using `'junction'`, the `target` argument will automatically be normalized to an absolute path. */ - export function symlink(target: PathLike, path: PathLike, type: string | undefined | null, callback: (err: NodeJS.ErrnoException) => void): void; + export function symlink(target: PathLike, path: PathLike, type: symlink.Type | undefined | null, callback: (err: NodeJS.ErrnoException) => void): void; /** * Asynchronous symlink(2) - Create a new symbolic link to an existing file. @@ -3480,6 +3480,8 @@ declare module "fs" { * When using `'junction'`, the `target` argument will automatically be normalized to an absolute path. */ export function __promisify__(target: PathLike, path: PathLike, type?: string | null): Promise; + + export type Type = "dir" | "file" | "junction"; } /** @@ -3489,7 +3491,7 @@ declare module "fs" { * @param type May be set to `'dir'`, `'file'`, or `'junction'` (default is `'file'`) and is only available on Windows (ignored on other platforms). * When using `'junction'`, the `target` argument will automatically be normalized to an absolute path. */ - export function symlinkSync(target: PathLike, path: PathLike, type?: string | null): void; + export function symlinkSync(target: PathLike, path: PathLike, type?: symlink.Type | null): void; /** * Asynchronous readlink(2) - read value of a symbolic link. diff --git a/types/node/v8/index.d.ts b/types/node/v8/index.d.ts index 27014e0cb0..8a27035ecc 100644 --- a/types/node/v8/index.d.ts +++ b/types/node/v8/index.d.ts @@ -3368,7 +3368,7 @@ declare module "fs" { * @param type May be set to `'dir'`, `'file'`, or `'junction'` (default is `'file'`) and is only available on Windows (ignored on other platforms). * When using `'junction'`, the `target` argument will automatically be normalized to an absolute path. */ - export function symlink(target: PathLike, path: PathLike, type: string | undefined | null, callback: (err: NodeJS.ErrnoException) => void): void; + export function symlink(target: PathLike, path: PathLike, type: symlink.Type | undefined | null, callback: (err: NodeJS.ErrnoException) => void): void; /** * Asynchronous symlink(2) - Create a new symbolic link to an existing file. @@ -3387,6 +3387,8 @@ declare module "fs" { * When using `'junction'`, the `target` argument will automatically be normalized to an absolute path. */ export function __promisify__(target: PathLike, path: PathLike, type?: string | null): Promise; + + export type Type = "dir" | "file" | "junction"; } /** @@ -3396,7 +3398,7 @@ declare module "fs" { * @param type May be set to `'dir'`, `'file'`, or `'junction'` (default is `'file'`) and is only available on Windows (ignored on other platforms). * When using `'junction'`, the `target` argument will automatically be normalized to an absolute path. */ - export function symlinkSync(target: PathLike, path: PathLike, type?: string | null): void; + export function symlinkSync(target: PathLike, path: PathLike, type?: symlink.Type | null): void; /** * Asynchronous readlink(2) - read value of a symbolic link. diff --git a/types/node/v9/index.d.ts b/types/node/v9/index.d.ts index 014fd9bac1..3fffc0a576 100644 --- a/types/node/v9/index.d.ts +++ b/types/node/v9/index.d.ts @@ -3450,7 +3450,7 @@ declare module "fs" { * @param type May be set to `'dir'`, `'file'`, or `'junction'` (default is `'file'`) and is only available on Windows (ignored on other platforms). * When using `'junction'`, the `target` argument will automatically be normalized to an absolute path. */ - export function symlink(target: PathLike, path: PathLike, type: string | undefined | null, callback: (err: NodeJS.ErrnoException) => void): void; + export function symlink(target: PathLike, path: PathLike, type: symlink.Type | undefined | null, callback: (err: NodeJS.ErrnoException) => void): void; /** * Asynchronous symlink(2) - Create a new symbolic link to an existing file. @@ -3469,6 +3469,8 @@ declare module "fs" { * When using `'junction'`, the `target` argument will automatically be normalized to an absolute path. */ export function __promisify__(target: PathLike, path: PathLike, type?: string | null): Promise; + + export type Type = "dir" | "file" | "junction"; } /** @@ -3478,7 +3480,7 @@ declare module "fs" { * @param type May be set to `'dir'`, `'file'`, or `'junction'` (default is `'file'`) and is only available on Windows (ignored on other platforms). * When using `'junction'`, the `target` argument will automatically be normalized to an absolute path. */ - export function symlinkSync(target: PathLike, path: PathLike, type?: string | null): void; + export function symlinkSync(target: PathLike, path: PathLike, type?: symlink.Type | null): void; /** * Asynchronous readlink(2) - read value of a symbolic link. From 813279ba32db4f5434d5e30bc5f61d1b68dd40b5 Mon Sep 17 00:00:00 2001 From: khai96_ Date: Thu, 24 May 2018 09:29:15 +0700 Subject: [PATCH 03/37] Update fs-extra-promise and fs-extra-promise-es6 * Edit `symlinkAsync` and `symlinkSync` * Fix test --- types/fs-extra-promise-es6/fs-extra-promise-es6-tests.ts | 6 +++--- types/fs-extra-promise-es6/index.d.ts | 4 ++-- types/fs-extra-promise/fs-extra-promise-tests.ts | 6 +++--- types/fs-extra-promise/index.d.ts | 5 +++-- 4 files changed, 11 insertions(+), 10 deletions(-) diff --git a/types/fs-extra-promise-es6/fs-extra-promise-es6-tests.ts b/types/fs-extra-promise-es6/fs-extra-promise-es6-tests.ts index bdff193912..9e076ff8eb 100644 --- a/types/fs-extra-promise-es6/fs-extra-promise-es6-tests.ts +++ b/types/fs-extra-promise-es6/fs-extra-promise-es6-tests.ts @@ -18,7 +18,7 @@ let buffer: Buffer; declare const modeNum: number; declare const modeStr: string; declare const encoding: string; -declare const type: string; +declare const symlinkType: "file" | "dir" | "junction"; declare const flags: string; declare const srcpath: string; declare const dstpath: string; @@ -117,8 +117,8 @@ stats = fs.lstatSync(path); stats = fs.fstatSync(fd); fs.link(srcpath, dstpath, errorCallback); fs.linkSync(srcpath, dstpath); -fs.symlink(srcpath, dstpath, type, errorCallback); -fs.symlinkSync(srcpath, dstpath, type); +fs.symlink(srcpath, dstpath, symlinkType, errorCallback); +fs.symlinkSync(srcpath, dstpath, symlinkType); fs.readlink(path, (err: Error, linkString: string) => { }); fs.realpath(path, (err: Error, resolvedPath: string) => { diff --git a/types/fs-extra-promise-es6/index.d.ts b/types/fs-extra-promise-es6/index.d.ts index 2b7dacd108..125fa51679 100644 --- a/types/fs-extra-promise-es6/index.d.ts +++ b/types/fs-extra-promise-es6/index.d.ts @@ -90,7 +90,7 @@ export function fstatSync(fd: number): Stats; export function link(srcpath: string, dstpath: string, callback?: (err: Error) => void): void; export function linkSync(srcpath: string, dstpath: string): void; export function symlink(srcpath: string, dstpath: string, type?: string, callback?: (err: Error) => void): void; -export function symlinkSync(srcpath: string, dstpath: string, type?: string): void; +export function symlinkSync(srcpath: string, dstpath: string, type?: fs.symlink.Type): void; export function readlink(path: string, callback?: (err: Error, linkString: string) => void): void; export function realpath(path: string, callback?: (err: Error, resolvedPath: string) => void): void; export function realpath(path: string, cache: string, callback: (err: Error, resolvedPath: string) => void): void; @@ -189,7 +189,7 @@ export function statAsync(path: string): Promise; export function lstatAsync(path: string): Promise; export function fstatAsync(fd: number): Promise; export function linkAsync(srcpath: string, dstpath: string): Promise; -export function symlinkAsync(srcpath: string, dstpath: string, type?: string): Promise; +export function symlinkAsync(srcpath: string, dstpath: string, type?: fs.symlink.Type): Promise; export function readlinkAsync(path: string): Promise; export function realpathAsync(path: string, cache?: string): Promise; export function unlinkAsync(path: string): Promise; diff --git a/types/fs-extra-promise/fs-extra-promise-tests.ts b/types/fs-extra-promise/fs-extra-promise-tests.ts index 61549a55ad..441e62b884 100644 --- a/types/fs-extra-promise/fs-extra-promise-tests.ts +++ b/types/fs-extra-promise/fs-extra-promise-tests.ts @@ -20,7 +20,7 @@ let buffer: Buffer; declare const modeNum: number; declare const modeStr: string; declare const encoding: string; -declare const type: string; +declare const symlinkType: "file" | "dir" | "junction"; declare const flags: string; declare const srcpath: string; declare const dstpath: string; @@ -117,8 +117,8 @@ stats = fs.lstatSync(path); stats = fs.fstatSync(fd); fs.link(srcpath, dstpath, errorCallback); fs.linkSync(srcpath, dstpath); -fs.symlink(srcpath, dstpath, type, errorCallback); -fs.symlinkSync(srcpath, dstpath, type); +fs.symlink(srcpath, dstpath, symlinkType, errorCallback); +fs.symlinkSync(srcpath, dstpath, symlinkType); fs.readlink(path, (err: Error, linkString: string) => { }); fs.realpath(path, (err: Error, resolvedPath: string) => { diff --git a/types/fs-extra-promise/index.d.ts b/types/fs-extra-promise/index.d.ts index b4ac5be133..a7222b9d5d 100644 --- a/types/fs-extra-promise/index.d.ts +++ b/types/fs-extra-promise/index.d.ts @@ -7,9 +7,10 @@ /// import * as stream from 'stream'; -import { Stats } from 'fs'; +import * as fs from 'fs'; import * as Promise from 'bluebird'; import { CopyFilter, CopyOptions, ReadOptions, WriteOptions, MoveOptions } from 'fs-extra'; +import Stats = fs.Stats; export * from 'fs-extra'; @@ -53,7 +54,7 @@ export function statAsync(path: string): Promise; export function lstatAsync(path: string): Promise; export function fstatAsync(fd: number): Promise; export function linkAsync(srcpath: string, dstpath: string): Promise; -export function symlinkAsync(srcpath: string, dstpath: string, type?: string): Promise; +export function symlinkAsync(srcpath: string, dstpath: string, type?: fs.symlink.Type): Promise; export function readlinkAsync(path: string): Promise; export function realpathAsync(path: string, cache?: { [path: string]: string }): Promise; export function unlinkAsync(path: string): Promise; From fab68fe2e91119fff60169e0df77695e29fff9a9 Mon Sep 17 00:00:00 2001 From: Derek Finlinson Date: Thu, 31 May 2018 10:02:37 -0600 Subject: [PATCH 04/37] Make formParameters optional for Xrm.Navigation.openForm --- types/xrm/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/xrm/index.d.ts b/types/xrm/index.d.ts index 18d8cae218..8521a198e8 100644 --- a/types/xrm/index.d.ts +++ b/types/xrm/index.d.ts @@ -4378,7 +4378,7 @@ declare namespace Xrm { /** * Opens an entity form or a quick create form. */ - openForm(entityFormOptions: Navigation.EntityFormOptions, formParameters: Utility.OpenParameters): Async.PromiseLike; + openForm(entityFormOptions: Navigation.EntityFormOptions, formParameters?: Utility.OpenParameters): Async.PromiseLike; /** * Opens a URL, including file URLs. From 4f7e3eac4adb1ee9cf9bca3f57b7ea7faf2de4f0 Mon Sep 17 00:00:00 2001 From: Derek Finlinson Date: Thu, 31 May 2018 10:32:47 -0600 Subject: [PATCH 05/37] Add interface for OpenFormResult --- types/xrm/index.d.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/types/xrm/index.d.ts b/types/xrm/index.d.ts index 8521a198e8..7be5205c24 100644 --- a/types/xrm/index.d.ts +++ b/types/xrm/index.d.ts @@ -4198,6 +4198,13 @@ declare namespace Xrm { confirmed: boolean; } + interface OpenFormResult { + /** + * Identifies the record displayed or created + */ + savedEntityReference: LookupValue[] + } + /** * Details to show in the Error dialog */ @@ -4378,7 +4385,7 @@ declare namespace Xrm { /** * Opens an entity form or a quick create form. */ - openForm(entityFormOptions: Navigation.EntityFormOptions, formParameters?: Utility.OpenParameters): Async.PromiseLike; + openForm(entityFormOptions: Navigation.EntityFormOptions, formParameters?: Utility.OpenParameters): Async.PromiseLike; /** * Opens a URL, including file URLs. From e30046775d6b5a52a9f5bfdc5b18886a522a80b0 Mon Sep 17 00:00:00 2001 From: Derek Finlinson Date: Thu, 31 May 2018 10:49:59 -0600 Subject: [PATCH 06/37] Missing semicolon --- types/xrm/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/xrm/index.d.ts b/types/xrm/index.d.ts index 7be5205c24..511fcc1083 100644 --- a/types/xrm/index.d.ts +++ b/types/xrm/index.d.ts @@ -4202,7 +4202,7 @@ declare namespace Xrm { /** * Identifies the record displayed or created */ - savedEntityReference: LookupValue[] + savedEntityReference: LookupValue[]; } /** From 47667055bbb80097f2a43bed68d5e022d6e7fa6a Mon Sep 17 00:00:00 2001 From: khai96_ Date: Fri, 1 Jun 2018 10:45:09 +0700 Subject: [PATCH 07/37] Restore .gitignore --- .gitignore | 3 --- 1 file changed, 3 deletions(-) diff --git a/.gitignore b/.gitignore index ac63b6f6b5..c8e25cec8d 100644 --- a/.gitignore +++ b/.gitignore @@ -49,6 +49,3 @@ npm-debug.log # yarn yarn.lock - -# pnpm -shrinkwrap.yaml From 0751408375f48acb4bffa13d481f69e5622d6497 Mon Sep 17 00:00:00 2001 From: Austin Riedhammer Date: Fri, 1 Jun 2018 01:13:57 -0700 Subject: [PATCH 08/37] remove dep on net interface only in node>=10 --- types/ws/index.d.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/types/ws/index.d.ts b/types/ws/index.d.ts index 9bdf092f38..3667941753 100644 --- a/types/ws/index.d.ts +++ b/types/ws/index.d.ts @@ -168,6 +168,12 @@ declare namespace WebSocket { maxPayload?: number; } + interface AddressInfo { + address: string; + family: string; + port: number; + } + // WebSocket Server class Server extends events.EventEmitter { options: ServerOptions; @@ -176,7 +182,7 @@ declare namespace WebSocket { constructor(options?: ServerOptions, callback?: () => void); - address(): net.AddressInfo | string; + address(): AddressInfo | string; close(cb?: (err?: Error) => void): void; handleUpgrade(request: http.IncomingMessage, socket: net.Socket, upgradeHead: Buffer, callback: (client: WebSocket) => void): void; From e1d3592bb249a4f8a15f38ba75d023914ec0db50 Mon Sep 17 00:00:00 2001 From: Joshua Goldberg Date: Sun, 3 Jun 2018 17:41:51 -0700 Subject: [PATCH 09/37] Added axe-webdriverjs typings --- .../axe-webdriverjs/axe-webdriverjs-tests.ts | 0 types/axe-webdriverjs/index.d.ts | 79 +++++++++++++++++++ types/axe-webdriverjs/package.json | 7 ++ types/axe-webdriverjs/tsconfig.json | 22 ++++++ types/axe-webdriverjs/tslint.json | 1 + 5 files changed, 109 insertions(+) create mode 100644 types/axe-webdriverjs/axe-webdriverjs-tests.ts create mode 100644 types/axe-webdriverjs/index.d.ts create mode 100644 types/axe-webdriverjs/package.json create mode 100644 types/axe-webdriverjs/tsconfig.json create mode 100644 types/axe-webdriverjs/tslint.json diff --git a/types/axe-webdriverjs/axe-webdriverjs-tests.ts b/types/axe-webdriverjs/axe-webdriverjs-tests.ts new file mode 100644 index 0000000000..e69de29bb2 diff --git a/types/axe-webdriverjs/index.d.ts b/types/axe-webdriverjs/index.d.ts new file mode 100644 index 0000000000..d8e3979145 --- /dev/null +++ b/types/axe-webdriverjs/index.d.ts @@ -0,0 +1,79 @@ +// Type definitions for axe-webdriverjs 2.0 +// Project: https://github.com/dequelabs/axe-webdriverjs#readme +// Definitions by: My Self +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +import { Result, RunOptions, Spec } from "axe-core"; +import { WebDriver } from "selenium-webdriver"; + +export interface IAxeAnalysis { + inapplicable: Result[]; + incomplete: Result[]; + passes: Result[]; + timestamp: string; + url: string; + violations: Result[]; +} + +export interface AxeBuilder { + (driver: WebDriver): AxeBuilder; + new (driver: WebDriver): AxeBuilder; + + /** + * Includes a selector in analysis. + * + * @param selector CSS selector of the element to include. + */ + include(selector: string): this; + + /** + * Excludes a selector from analysis. + * + * @param selector CSS selector of the element to exclude. + */ + exclude(selector: string): this; + + /** + * Options to directly pass to `axe.run`. + * + * @param options aXe options object. + * @remarks Will override any other configured options, including calls to `withRules` and `withTags`. + */ + options(options: RunOptions): this; + + /** + * Limits analysis to only the specified rules. + * + * @param rules Array of rule IDs, or a single rule ID as a string. + * @remarks Cannot be used with `withTags`. + */ + withRules(rules: string | string[]): this; + + /** + * Limist analysis to only the specified tags. + * + * @param rules Array of tags, or a single tag as a string + * @remarks Cannot be used with `withRules`. + */ + withTags(tags: string | string[]): this; + + /** + * Set the list of rules to skip when running an analysis + * + * @param rules Array of rule IDs, or a single rule ID as a string + */ + disableRules(rules: string | string[]): this; + + /** + * Configures aXe before running analyze. + * + * @param config aXe Configuration spec to use in analysis. + */ + configure(config: Spec): this; + + /** + * Perform analysis and retrieve results. + * @param callback Function to execute when analysis completes. + */ + analyze(callback: (results: IAxeAnalysis) => void): Promise; +} diff --git a/types/axe-webdriverjs/package.json b/types/axe-webdriverjs/package.json new file mode 100644 index 0000000000..5d94289f3b --- /dev/null +++ b/types/axe-webdriverjs/package.json @@ -0,0 +1,7 @@ +{ + "private": true, + "dependencies": { + "@types/selenium-webdriver": "^3.0.0", + "axe-core": "^2.6.1" + } +} diff --git a/types/axe-webdriverjs/tsconfig.json b/types/axe-webdriverjs/tsconfig.json new file mode 100644 index 0000000000..efa6dfcf98 --- /dev/null +++ b/types/axe-webdriverjs/tsconfig.json @@ -0,0 +1,22 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "axe-webdriverjs-tests.ts" + ] +} diff --git a/types/axe-webdriverjs/tslint.json b/types/axe-webdriverjs/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/axe-webdriverjs/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } From 270e304ab614062f54fa943fb205f3f30fd50c20 Mon Sep 17 00:00:00 2001 From: Derek Finlinson Date: Mon, 4 Jun 2018 08:32:19 -0600 Subject: [PATCH 10/37] Fix other Navigation methods --- types/xrm/index.d.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/types/xrm/index.d.ts b/types/xrm/index.d.ts index 511fcc1083..fdb6504e96 100644 --- a/types/xrm/index.d.ts +++ b/types/xrm/index.d.ts @@ -4361,26 +4361,26 @@ declare namespace Xrm { * @param alertStrings The strings to be used in the alert dialog. * @param alertOptions The height and width options for alert dialog */ - openAlertDialog(alertStrings: Navigation.AlertStrings, alertOptions: Navigation.DialogSizeOptions): Async.PromiseLike; + openAlertDialog(alertStrings: Navigation.AlertStrings, alertOptions?: Navigation.DialogSizeOptions): Async.PromiseLike; /** * Displays a confirmation dialog box containing a message and two buttons. * @param confirmStrings The strings to be used in the confirm dialog. * @param confirmOptions The height and width options for alert dialog */ - openConfirmDialog(confirmStrings: Navigation.ConfirmStrings, confirmOptions: Navigation.DialogSizeOptions): Async.PromiseLike; + openConfirmDialog(confirmStrings: Navigation.ConfirmStrings, confirmOptions?: Navigation.DialogSizeOptions): Async.PromiseLike; /** * Displays an error dialog. * @param confirmStrings The strings to be used in the confirm dialog. * @param confirmOptions The height and width options for alert dialog */ - openConfirmDialog(errorOptions: Navigation.ErrorDialogOptions): Async.PromiseLike; + openErrorDialog(errorOptions: Navigation.ErrorDialogOptions): Async.PromiseLike; /** * Opens a file. */ - openFile(file: Navigation.FileDetails, openFileOptions: XrmEnum.OpenFileOptions): void; + openFile(file: Navigation.FileDetails, openFileOptions?: XrmEnum.OpenFileOptions): void; /** * Opens an entity form or a quick create form. From 6ddc57f14d431f54aa17a5c92427c62b08cb3fe6 Mon Sep 17 00:00:00 2001 From: Mark Yao Date: Thu, 31 May 2018 15:41:13 -0700 Subject: [PATCH 11/37] Add T=Element defaults --- types/react/index.d.ts | 58 +++++++++++++++++++++--------------------- 1 file changed, 29 insertions(+), 29 deletions(-) diff --git a/types/react/index.d.ts b/types/react/index.d.ts index 9107ac61ec..27a76a9a08 100644 --- a/types/react/index.d.ts +++ b/types/react/index.d.ts @@ -547,7 +547,7 @@ declare namespace React { // Event System // ---------------------------------------------------------------------- - interface SyntheticEvent { + interface SyntheticEvent { bubbles: boolean; /** * A reference to the element on which the event listener is registered. @@ -575,40 +575,40 @@ declare namespace React { type: string; } - interface ClipboardEvent extends SyntheticEvent { + interface ClipboardEvent extends SyntheticEvent { clipboardData: DataTransfer; nativeEvent: NativeClipboardEvent; } - interface CompositionEvent extends SyntheticEvent { + interface CompositionEvent extends SyntheticEvent { data: string; nativeEvent: NativeCompositionEvent; } - interface DragEvent extends MouseEvent { + interface DragEvent extends MouseEvent { dataTransfer: DataTransfer; nativeEvent: NativeDragEvent; } - interface FocusEvent extends SyntheticEvent { + interface FocusEvent extends SyntheticEvent { nativeEvent: NativeFocusEvent; relatedTarget: EventTarget; target: EventTarget & T; } // tslint:disable-next-line:no-empty-interface - interface FormEvent extends SyntheticEvent { + interface FormEvent extends SyntheticEvent { } - interface InvalidEvent extends SyntheticEvent { + interface InvalidEvent extends SyntheticEvent { target: EventTarget & T; } - interface ChangeEvent extends SyntheticEvent { + interface ChangeEvent extends SyntheticEvent { target: EventTarget & T; } - interface KeyboardEvent extends SyntheticEvent { + interface KeyboardEvent extends SyntheticEvent { altKey: boolean; charCode: number; ctrlKey: boolean; @@ -630,7 +630,7 @@ declare namespace React { which: number; } - interface MouseEvent extends SyntheticEvent { + interface MouseEvent extends SyntheticEvent { altKey: boolean; button: number; buttons: number; @@ -651,7 +651,7 @@ declare namespace React { shiftKey: boolean; } - interface TouchEvent extends SyntheticEvent { + interface TouchEvent extends SyntheticEvent { altKey: boolean; changedTouches: TouchList; ctrlKey: boolean; @@ -666,13 +666,13 @@ declare namespace React { touches: TouchList; } - interface UIEvent extends SyntheticEvent { + interface UIEvent extends SyntheticEvent { detail: number; nativeEvent: NativeUIEvent; view: AbstractView; } - interface WheelEvent extends MouseEvent { + interface WheelEvent extends MouseEvent { deltaMode: number; deltaX: number; deltaY: number; @@ -680,14 +680,14 @@ declare namespace React { nativeEvent: NativeWheelEvent; } - interface AnimationEvent extends SyntheticEvent { + interface AnimationEvent extends SyntheticEvent { animationName: string; elapsedTime: number; nativeEvent: NativeAnimationEvent; pseudoElement: string; } - interface TransitionEvent extends SyntheticEvent { + interface TransitionEvent extends SyntheticEvent { elapsedTime: number; nativeEvent: NativeTransitionEvent; propertyName: string; @@ -700,21 +700,21 @@ declare namespace React { type EventHandler> = { bivarianceHack(event: E): void }["bivarianceHack"]; - type ReactEventHandler = EventHandler>; + type ReactEventHandler = EventHandler>; - type ClipboardEventHandler = EventHandler>; - type CompositionEventHandler = EventHandler>; - type DragEventHandler = EventHandler>; - type FocusEventHandler = EventHandler>; - type FormEventHandler = EventHandler>; - type ChangeEventHandler = EventHandler>; - type KeyboardEventHandler = EventHandler>; - type MouseEventHandler = EventHandler>; - type TouchEventHandler = EventHandler>; - type UIEventHandler = EventHandler>; - type WheelEventHandler = EventHandler>; - type AnimationEventHandler = EventHandler>; - type TransitionEventHandler = EventHandler>; + type ClipboardEventHandler = EventHandler>; + type CompositionEventHandler = EventHandler>; + type DragEventHandler = EventHandler>; + type FocusEventHandler = EventHandler>; + type FormEventHandler = EventHandler>; + type ChangeEventHandler = EventHandler>; + type KeyboardEventHandler = EventHandler>; + type MouseEventHandler = EventHandler>; + type TouchEventHandler = EventHandler>; + type UIEventHandler = EventHandler>; + type WheelEventHandler = EventHandler>; + type AnimationEventHandler = EventHandler>; + type TransitionEventHandler = EventHandler>; // // Props / DOM Attributes From f3952aa7fe7397c739ed07327c60f8303c6b9eaa Mon Sep 17 00:00:00 2001 From: Mark Yao Date: Mon, 4 Jun 2018 12:08:23 -0700 Subject: [PATCH 12/37] empty commit From 9b0e0aabfb90b91e84f68bcf61022442f43e98d7 Mon Sep 17 00:00:00 2001 From: Claas Ahlrichs Date: Tue, 5 Jun 2018 06:53:06 +0200 Subject: [PATCH 13/37] added "value" parameter to "valueProcessors" and "attrValueProcessors" --- types/xml2js/index.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/types/xml2js/index.d.ts b/types/xml2js/index.d.ts index 248f29814b..1875399e23 100644 --- a/types/xml2js/index.d.ts +++ b/types/xml2js/index.d.ts @@ -34,7 +34,7 @@ export interface Options { async?: boolean; attrkey?: string; attrNameProcessors?: Array<(name: string) => any>; - attrValueProcessors?: Array<(name: string) => any>; + attrValueProcessors?: Array<(value: string, name: string) => any>; charkey?: string; charsAsChildren?: boolean; childkey?: string; @@ -52,7 +52,7 @@ export interface Options { tagNameProcessors?: Array<(name: string) => any>; trim?: boolean; validator?: Function; - valueProcessors?: Array<(name: string) => any>; + valueProcessors?: Array<(value: string, name: string) => any>; xmlns?: boolean; } From 6b431cf55b8dde05e8be3c122f996178e6ac0724 Mon Sep 17 00:00:00 2001 From: Shini Ko Date: Tue, 5 Jun 2018 15:09:13 -0400 Subject: [PATCH 14/37] Add typing for method in libphonenumber --- types/google-libphonenumber/index.d.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/types/google-libphonenumber/index.d.ts b/types/google-libphonenumber/index.d.ts index dd73c56790..52d2208c8f 100644 --- a/types/google-libphonenumber/index.d.ts +++ b/types/google-libphonenumber/index.d.ts @@ -112,6 +112,7 @@ declare namespace libphonenumber { export class PhoneNumberUtil { static getInstance(): PhoneNumberUtil + extractCountryCode(fullNumber: any, nationalNumber: any): number; format(phoneNumber: PhoneNumber, format: PhoneNumberFormat): string; formatOutOfCountryCallingNumber(phoneNumber: PhoneNumber, regionDialingFrom?: string): string; getNddPrefixForRegion(regionCode?: string, stripNonDigits?: boolean): string | undefined; From 6cfd95fb7fe0a931c8161656bf4e9a2ea95a9e5a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tobias=20Nie=C3=9Fen?= Date: Tue, 5 Jun 2018 20:44:13 +0200 Subject: [PATCH 15/37] nodegit: Fix return type of Commit#amend --- types/nodegit/commit.d.ts | 2 +- types/nodegit/index.d.ts | 4 ++-- types/nodegit/nodegit-tests.ts | 6 ++++++ 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/types/nodegit/commit.d.ts b/types/nodegit/commit.d.ts index 5c9a82bf70..11ab938130 100644 --- a/types/nodegit/commit.d.ts +++ b/types/nodegit/commit.d.ts @@ -21,7 +21,7 @@ export class Commit { static lookupPrefix(repo: Repository, id: Oid, len: number): Promise; static createWithSignature(repo: Repository, commitContent: string, signature: string, signatureField: string): Promise; - amend(updateRef: string, author: Signature, committer: Signature, messageEncoding: string, message: string, tree: Tree): Oid; + amend(updateRef: string, author: Signature, committer: Signature, messageEncoding: string, message: string, tree: Tree): Promise; author(): Signature; committer(): Signature; diff --git a/types/nodegit/index.d.ts b/types/nodegit/index.d.ts index e6d95ba83e..d1afcd6ea4 100644 --- a/types/nodegit/index.d.ts +++ b/types/nodegit/index.d.ts @@ -1,6 +1,6 @@ -// Type definitions for nodegit 0.18 +// Type definitions for nodegit 0.22 // Project: https://github.com/nodegit/nodegit -// Definitions by: Dolan Miu +// Definitions by: Dolan Miu , Tobias Nießen // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped export { AnnotatedCommit } from './annotated-commit'; diff --git a/types/nodegit/nodegit-tests.ts b/types/nodegit/nodegit-tests.ts index 00d988d77f..1732844d1c 100644 --- a/types/nodegit/nodegit-tests.ts +++ b/types/nodegit/nodegit-tests.ts @@ -11,6 +11,7 @@ Git.Repository.init("path", 0).then((repository) => { const repo = new Git.Repository(); const id = new Git.Oid(); const ref = new Git.Reference(); +const tree = new Git.Tree(); // AnnotatedCommit Tests @@ -52,6 +53,11 @@ Git.Branch.lookup(repo, "branch_name", Git.Branch.BRANCH.LOCAL).then((reference) // Use reference }); +repo.getCommit("0123456789abcdef0123456789abcdef").then((commit) => { + const sig = Git.Signature.now('John Doe', 'jd@example.com'); + const newCommit: Promise = commit.amend('ref', sig, sig, 'utf8', 'message', tree); +}); + const signature = Git.Signature.now("name", "email"); signature.name(); signature.email(); From c1120c28c753b8e3e65d85d8cb95394c6af96edc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomek=20=C5=81aziuk?= Date: Tue, 5 Jun 2018 21:37:12 +0200 Subject: [PATCH 16/37] koa-webpack v5 --- types/koa-webpack/index.d.ts | 16 ++++++++------ types/koa-webpack/koa-webpack-tests.ts | 30 +++++++++++++++----------- 2 files changed, 27 insertions(+), 19 deletions(-) diff --git a/types/koa-webpack/index.d.ts b/types/koa-webpack/index.d.ts index 4f86fcd11f..79bd913ef4 100644 --- a/types/koa-webpack/index.d.ts +++ b/types/koa-webpack/index.d.ts @@ -1,6 +1,7 @@ -// Type definitions for koa-webpack 1.0 -// Project: https://github.com/shellscape/koa-webpack#readme +// Type definitions for koa-webpack 5.0 +// Project: https://github.com/shellscape/koa-webpack // Definitions by: Luka Maljic +// Tomek Łaziuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.3 @@ -12,19 +13,20 @@ import connect = require('connect'); declare function koaWebpack( options?: koaWebpack.Options -): Koa.Middleware & koaWebpack.CombinedWebpackMiddleware; +): Promise; declare namespace koaWebpack { interface Options { compiler?: webpack.Compiler; config?: webpack.Configuration; - dev?: webpackDevMiddleware.Options; - hot?: webpackHotMiddleware.Options | boolean; + devMiddleware?: webpackDevMiddleware.Options; + hotClient?: webpackHotMiddleware.Options | boolean; } interface CombinedWebpackMiddleware { - dev: connect.NextHandleFunction & webpackDevMiddleware.WebpackDevMiddleware; - hot: connect.NextHandleFunction & webpackHotMiddleware.EventStream; + devMiddleware: connect.NextHandleFunction & webpackDevMiddleware.WebpackDevMiddleware; + hotClient: connect.NextHandleFunction & webpackHotMiddleware.EventStream; + close(callback?: () => any): void; } } diff --git a/types/koa-webpack/koa-webpack-tests.ts b/types/koa-webpack/koa-webpack-tests.ts index 12062302de..fb36247d90 100644 --- a/types/koa-webpack/koa-webpack-tests.ts +++ b/types/koa-webpack/koa-webpack-tests.ts @@ -8,10 +8,10 @@ const compiler = webpack(config); // Using the middleware -const middleware = koaWebpack({ +koaWebpack({ compiler, config, - dev: { + devMiddleware: { lazy: true, watchOptions: { aggregateTimeout: 300, @@ -28,18 +28,24 @@ const middleware = koaWebpack({ reporter: null, serverSideRender: false }, - hot: { + hotClient: { log: console.log.bind(console), path: '/__what', heartbeat: 2000 } +}).then((middleware) => { + app.use(middleware); + + // Accessing the underlying middleware + + middleware.devMiddleware.close(); + middleware.devMiddleware.invalidate(); + middleware.devMiddleware.waitUntilValid(); + middleware.hotClient.publish(null); + + return middleware; +}).then((middleware) => { + // close the middleware + + middleware.close(); }); - -app.use(middleware); - -// Accessing the underlying middleware - -middleware.dev.close(); -middleware.dev.invalidate(); -middleware.dev.waitUntilValid(); -middleware.hot.publish(null); From 851efd77ea67cac43242c53443ffbc223e76e4c9 Mon Sep 17 00:00:00 2001 From: Shini Ko Date: Tue, 5 Jun 2018 15:43:34 -0400 Subject: [PATCH 17/37] Add typing to StringBuffer --- types/google-libphonenumber/index.d.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/types/google-libphonenumber/index.d.ts b/types/google-libphonenumber/index.d.ts index 52d2208c8f..5bdb6f5eab 100644 --- a/types/google-libphonenumber/index.d.ts +++ b/types/google-libphonenumber/index.d.ts @@ -110,9 +110,15 @@ declare namespace libphonenumber { } } + class StringBuffer { + constructor(opt_a1?: any, ...var_args: any[]); + append(a1: any, opt_a2?: any, ...var_args: any[]): StringBuffer; + toString(): string; + } + export class PhoneNumberUtil { static getInstance(): PhoneNumberUtil - extractCountryCode(fullNumber: any, nationalNumber: any): number; + extractCountryCode(fullNumber: StringBuffer, nationalNumber: StringBuffer): number; format(phoneNumber: PhoneNumber, format: PhoneNumberFormat): string; formatOutOfCountryCallingNumber(phoneNumber: PhoneNumber, regionDialingFrom?: string): string; getNddPrefixForRegion(regionCode?: string, stripNonDigits?: boolean): string | undefined; From 4da90836d0103c07e5c611f12cc270512d7e3bcc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomek=20=C5=81aziuk?= Date: Tue, 5 Jun 2018 21:56:51 +0200 Subject: [PATCH 18/37] remove blank line --- types/koa-webpack/koa-webpack-tests.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/types/koa-webpack/koa-webpack-tests.ts b/types/koa-webpack/koa-webpack-tests.ts index f7f8aaf813..4821059a9b 100644 --- a/types/koa-webpack/koa-webpack-tests.ts +++ b/types/koa-webpack/koa-webpack-tests.ts @@ -54,7 +54,6 @@ koaWebpack({ middleware.hotClient.options; middleware.hotClient.server; - // close the middleware middleware.close(() => { console.log('closed'); From da502e396ad9e900aea60b76bdf797b34cfbc94f Mon Sep 17 00:00:00 2001 From: Shayne Hartford Date: Tue, 5 Jun 2018 16:27:27 -0400 Subject: [PATCH 19/37] Fixed query and set's param types --- types/snekfetch/index.d.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/types/snekfetch/index.d.ts b/types/snekfetch/index.d.ts index 643c376c5a..ecaf995d8f 100644 --- a/types/snekfetch/index.d.ts +++ b/types/snekfetch/index.d.ts @@ -110,13 +110,13 @@ declare class Snekfetch extends Readable { static unlock(url: string, opts?: Snekfetch.SnekfetchOptions): Snekfetch; static unsubscribe(url: string, opts?: Snekfetch.SnekfetchOptions): Snekfetch; - query(name: string | { [key: string]: string | string[] }, value?: string): Snekfetch; + query(name: string | object, value?: string): Snekfetch; - set(name: string | { [key: string]: string | string[] }, value?: string | string[]): Snekfetch; + set(name: string | object, value?: string): Snekfetch; attach(name: string, data: string | object | Buffer, filename?: string): Snekfetch; - send(data?: string|Buffer|object): Snekfetch; + send(data?: string | Buffer | object): Snekfetch; then(): Promise; then(resolver: (res: Snekfetch.SnekfetchResponse) => T, rejector?: (err: Error) => any): Promise; From 7886cf621ac3142c4c2e6d0ed204e09c97c0cb1a Mon Sep 17 00:00:00 2001 From: Shayne Hartford Date: Tue, 5 Jun 2018 16:33:09 -0400 Subject: [PATCH 20/37] Key should be a string - Yukine --- types/snekfetch/index.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/types/snekfetch/index.d.ts b/types/snekfetch/index.d.ts index ecaf995d8f..4885656a98 100644 --- a/types/snekfetch/index.d.ts +++ b/types/snekfetch/index.d.ts @@ -110,9 +110,9 @@ declare class Snekfetch extends Readable { static unlock(url: string, opts?: Snekfetch.SnekfetchOptions): Snekfetch; static unsubscribe(url: string, opts?: Snekfetch.SnekfetchOptions): Snekfetch; - query(name: string | object, value?: string): Snekfetch; + query(name: string | { [key: string]: any }, value?: string): Snekfetch; - set(name: string | object, value?: string): Snekfetch; + set(name: string | { [key: string]: any }, value?: string): Snekfetch; attach(name: string, data: string | object | Buffer, filename?: string): Snekfetch; From 4bcbb7024088a52cfab69e507d44bb604b35424c Mon Sep 17 00:00:00 2001 From: David Koblas Date: Tue, 5 Jun 2018 16:59:15 -0400 Subject: [PATCH 21/37] Add generic types to Queue and Job --- types/bull/bull-tests.tsx | 2 +- types/bull/index.d.ts | 43 ++++++++++++++++++++------------------- 2 files changed, 23 insertions(+), 22 deletions(-) diff --git a/types/bull/bull-tests.tsx b/types/bull/bull-tests.tsx index 765be54733..c2e0d3161f 100644 --- a/types/bull/bull-tests.tsx +++ b/types/bull/bull-tests.tsx @@ -7,7 +7,7 @@ import Queue = require("bull"); const videoQueue = new Queue('video transcoding', 'redis://127.0.0.1:6379'); const audioQueue = new Queue('audio transcoding', {redis: {port: 6379, host: '127.0.0.1'}}); // Specify Redis connection using object -const imageQueue = new Queue('image transcoding'); +const imageQueue: Queue.Queue<{ image: string }> = new Queue('image transcoding'); videoQueue.process((job, done) => { // job.data contains the custom data passed when the job was created diff --git a/types/bull/index.d.ts b/types/bull/index.d.ts index dd97de15ac..83cc4a69bd 100644 --- a/types/bull/index.d.ts +++ b/types/bull/index.d.ts @@ -6,6 +6,7 @@ // Weeco // Gabriel Terwesten // Oleg Repin +// David Koblas // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.3 @@ -87,13 +88,13 @@ declare namespace Bull { type JobId = number | string; - interface Job { + interface Job { id: JobId; /** * The custom data passed when the job was created */ - data: any; + data: T; /** * How many attempts where made to run this job @@ -258,7 +259,7 @@ declare namespace Bull { next: number; } - interface Queue { + interface Queue { /** * Returns a promise that resolves when Redis is connected and the queue is ready to accept jobs. * This replaces the `ready` event emitted on Queue in previous verisons. @@ -276,7 +277,7 @@ declare namespace Bull { * Errors will be passed as a second argument to the "failed" event; * results, as a second argument to the "completed" event. */ - process(callback: (job: Job, done: DoneCallback) => void): void; + process(callback: (job: Job, done: DoneCallback) => void): void; /** * Defines a processing function for the jobs placed into a given Queue. @@ -294,7 +295,7 @@ declare namespace Bull { * If the promise is rejected, the error will be passed as a second argument to the "failed" event. * If it is resolved, its value will be the "completed" event's second argument. */ - process(callback: ((job: Job) => void) | string): Promise; + process(callback: ((job: Job) => void) | string): Promise; /** * Defines a processing function for the jobs placed into a given Queue. @@ -314,7 +315,7 @@ declare namespace Bull { * * @param concurrency Bull will then call you handler in parallel respecting this max number. */ - process(concurrency: number, callback: ((job: Job) => void) | string): Promise; + process(concurrency: number, callback: ((job: Job) => void) | string): Promise; /** * Defines a processing function for the jobs placed into a given Queue. @@ -329,7 +330,7 @@ declare namespace Bull { * * @param concurrency Bull will then call you handler in parallel respecting this max number. */ - process(concurrency: number, callback: (job: Job, done: DoneCallback) => void): void; + process(concurrency: number, callback: (job: Job, done: DoneCallback) => void): void; /** * Defines a named processing function for the jobs placed into a given Queue. @@ -350,7 +351,7 @@ declare namespace Bull { * @param name Bull will only call the handler if the job name matches */ // tslint:disable-next-line:unified-signatures - process(name: string, callback: ((job: Job) => void) | string): Promise; + process(name: string, callback: ((job: Job) => void) | string): Promise; /** * Defines a processing function for the jobs placed into a given Queue. @@ -366,7 +367,7 @@ declare namespace Bull { * @param name Bull will only call the handler if the job name matches */ // tslint:disable-next-line:unified-signatures - process(name: string, callback: (job: Job, done: DoneCallback) => void): void; + process(name: string, callback: (job: Job, done: DoneCallback) => void): void; /** * Defines a named processing function for the jobs placed into a given Queue. @@ -387,7 +388,7 @@ declare namespace Bull { * @param name Bull will only call the handler if the job name matches * @param concurrency Bull will then call you handler in parallel respecting this max number. */ - process(name: string, concurrency: number, callback: ((job: Job) => void) | string): Promise; + process(name: string, concurrency: number, callback: ((job: Job) => void) | string): Promise; /** * Defines a processing function for the jobs placed into a given Queue. @@ -403,21 +404,21 @@ declare namespace Bull { * @param name Bull will only call the handler if the job name matches * @param concurrency Bull will then call you handler in parallel respecting this max number. */ - process(name: string, concurrency: number, callback: (job: Job, done: DoneCallback) => void): void; + process(name: string, concurrency: number, callback: (job: Job, done: DoneCallback) => void): void; /** * Creates a new job and adds it to the queue. * If the queue is empty the job will be executed directly, * otherwise it will be placed in the queue and executed as soon as possible. */ - add(data: any, opts?: JobOptions): Promise; + add(data: T, opts?: JobOptions): Promise>; /** * Creates a new named job and adds it to the queue. * If the queue is empty the job will be executed directly, * otherwise it will be placed in the queue and executed as soon as possible. */ - add(name: string, data: any, opts?: JobOptions): Promise; + add(name: string, data: T, opts?: JobOptions): Promise>; /** * Returns a promise that resolves when the queue is paused. @@ -466,32 +467,32 @@ declare namespace Bull { * Returns a promise that will return the job instance associated with the jobId parameter. * If the specified job cannot be located, the promise callback parameter will be set to null. */ - getJob(jobId: JobId): Promise; + getJob(jobId: JobId): Promise>; /** * Returns a promise that will return an array with the waiting jobs between start and end. */ - getWaiting(start?: number, end?: number): Promise; + getWaiting(start?: number, end?: number): Promise>>; /** * Returns a promise that will return an array with the active jobs between start and end. */ - getActive(start?: number, end?: number): Promise; + getActive(start?: number, end?: number): Promise>>; /** * Returns a promise that will return an array with the delayed jobs between start and end. */ - getDelayed(start?: number, end?: number): Promise; + getDelayed(start?: number, end?: number): Promise>>; /** * Returns a promise that will return an array with the completed jobs between start and end. */ - getCompleted(start?: number, end?: number): Promise; + getCompleted(start?: number, end?: number): Promise>>; /** * Returns a promise that will return an array with the failed jobs between start and end. */ - getFailed(start?: number, end?: number): Promise; + getFailed(start?: number, end?: number): Promise>>; /** * Returns JobInformation of repeatable jobs (ordered descending). Provide a start and/or an end @@ -502,7 +503,7 @@ declare namespace Bull { /** * ??? */ - nextRepeatableJob(name: string, data: any, opts: JobOptions): Promise; + nextRepeatableJob(name: string, data: any, opts: JobOptions): Promise>; /** * Removes a given repeatable job. The RepeatOptions and JobId needs to be the same as the ones @@ -565,7 +566,7 @@ declare namespace Bull { * @param status Status of the job to clean. Values are completed, wait, active, delayed, and failed. Defaults to completed. * @param limit Maximum amount of jobs to clean per call. If not provided will clean all matching jobs. */ - clean(grace: number, status?: JobStatus, limit?: number): Promise; + clean(grace: number, status?: JobStatus, limit?: number): Promise>>; /** * Listens to queue events From 5a70beef53ba1dca757130fbae9a4befcdda1989 Mon Sep 17 00:00:00 2001 From: Shayne Hartford Date: Tue, 5 Jun 2018 17:11:36 -0400 Subject: [PATCH 22/37] Fixed author --- types/snekfetch/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/snekfetch/index.d.ts b/types/snekfetch/index.d.ts index 4885656a98..aa831be0cc 100644 --- a/types/snekfetch/index.d.ts +++ b/types/snekfetch/index.d.ts @@ -1,6 +1,6 @@ // Type definitions for snekfetch 4.0 // Project: https://github.com/GusCaplan/snekfetch -// Definitions by: Iker Pérez Brunelli +// Definitions by: Iker Pérez Brunelli // Shayne Hartford // Yukine // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped From 60009ab2a6a13daae68e6e6e7b1b3a1c709f30af Mon Sep 17 00:00:00 2001 From: David Koblas Date: Tue, 5 Jun 2018 17:44:52 -0400 Subject: [PATCH 23/37] Updated the the event handlers with generic T --- types/bull/index.d.ts | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/types/bull/index.d.ts b/types/bull/index.d.ts index 83cc4a69bd..cdef279acb 100644 --- a/types/bull/index.d.ts +++ b/types/bull/index.d.ts @@ -581,28 +581,28 @@ declare namespace Bull { /** * A job has started. You can use `jobPromise.cancel()` to abort it */ - on(event: 'active', callback: ActiveEventCallback): this; + on(event: 'active', callback: ActiveEventCallback): this; /** * A job has been marked as stalled. * This is useful for debugging job workers that crash or pause the event loop. */ - on(event: 'stalled', callback: StalledEventCallback): this; + on(event: 'stalled', callback: StalledEventCallback): this; /** * A job's progress was updated */ - on(event: 'progress', callback: ProgressEventCallback): this; + on(event: 'progress', callback: ProgressEventCallback): this; /** * A job successfully completed with a `result` */ - on(event: 'completed', callback: CompletedEventCallback): this; + on(event: 'completed', callback: CompletedEventCallback): this; /** * A job failed with `err` as the reason */ - on(event: 'failed', callback: FailedEventCallback): this; + on(event: 'failed', callback: FailedEventCallback): this; /** * The queue has been paused @@ -620,7 +620,7 @@ declare namespace Bull { * * @see Queue#clean() for details */ - on(event: 'cleaned', callback: CleanedEventCallback): this; + on(event: 'cleaned', callback: CleanedEventCallback): this; } type EventCallback = () => void; @@ -634,17 +634,17 @@ declare namespace Bull { cancel(): void; } - type ActiveEventCallback = (job: Job, jobPromise?: JobPromise) => void; + type ActiveEventCallback = (job: Job, jobPromise?: JobPromise) => void; - type StalledEventCallback = (job: Job) => void; + type StalledEventCallback = (job: Job) => void; - type ProgressEventCallback = (job: Job, progress: any) => void; + type ProgressEventCallback = (job: Job, progress: any) => void; - type CompletedEventCallback = (job: Job, result: any) => void; + type CompletedEventCallback = (job: Job, result: any) => void; - type FailedEventCallback = (job: Job, error: Error) => void; + type FailedEventCallback = (job: Job, error: Error) => void; - type CleanedEventCallback = (jobs: Job[], status: JobStatus) => void; + type CleanedEventCallback = (jobs: Array>, status: JobStatus) => void; } export = Bull; From a84eda7449c8ab24553822c63f1d3d10a8626bb6 Mon Sep 17 00:00:00 2001 From: Justin Bay Date: Tue, 5 Jun 2018 19:34:36 -0400 Subject: [PATCH 24/37] remove myself from puppeteer types --- types/puppeteer/index.d.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/types/puppeteer/index.d.ts b/types/puppeteer/index.d.ts index 510ae37107..9b81adcac7 100644 --- a/types/puppeteer/index.d.ts +++ b/types/puppeteer/index.d.ts @@ -2,7 +2,6 @@ // Project: https://github.com/GoogleChrome/puppeteer#readme // Definitions by: Marvin Hagemeister // Christopher Deutsch -// jwbay // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.3 From 45a5c626532acd09857b6610be09d05442c01233 Mon Sep 17 00:00:00 2001 From: Kyle Roach Date: Tue, 5 Jun 2018 19:50:42 -0400 Subject: [PATCH 25/37] [react-navigation] Add index to NavigationLeafRoute --- types/react-navigation/index.d.ts | 4 ++++ .../react-navigation-tests.tsx | 18 ++++++++++++++++++ 2 files changed, 22 insertions(+) diff --git a/types/react-navigation/index.d.ts b/types/react-navigation/index.d.ts index ef4904c11f..dd9efa0de4 100644 --- a/types/react-navigation/index.d.ts +++ b/types/react-navigation/index.d.ts @@ -96,6 +96,10 @@ export interface NavigationLeafRoute { * they will be defined by the router. */ key: string; + /** + * Index that represents the depth of the stack + */ + index: number; /** * For example 'Home'. * This is used as a key in a route config when creating a navigator. diff --git a/types/react-navigation/react-navigation-tests.tsx b/types/react-navigation/react-navigation-tests.tsx index b59474bd11..9697e61de8 100644 --- a/types/react-navigation/react-navigation-tests.tsx +++ b/types/react-navigation/react-navigation-tests.tsx @@ -6,6 +6,7 @@ import { } from 'react-native'; import { createDrawerNavigator, + createBottomTabNavigator, DrawerNavigatorConfig, NavigationAction, NavigationActions, @@ -451,3 +452,20 @@ class Page2 extends React.Component { return { this.navigatorRef = instance; }} />; } } + +const BottomStack = createBottomTabNavigator({ + Posts: { + screen: Page2, + navigationOptions: ({ navigation }: NavigationScreenProps) => { + let tabBarVisible = true; + + if (navigation.state.index > 0) { + tabBarVisible = false; + } + + return { + tabBarVisible + }; + } + } +}); From 63d8cf1a1facd5d188f73f58f4968e94edd5cbbf Mon Sep 17 00:00:00 2001 From: Alex Jerabek Date: Tue, 5 Jun 2018 18:13:12 -0700 Subject: [PATCH 26/37] Removing redundant mode guidance --- types/office-js/index.d.ts | 121 ++++++++++++++++++------------------- 1 file changed, 60 insertions(+), 61 deletions(-) diff --git a/types/office-js/index.d.ts b/types/office-js/index.d.ts index 718f1bd34f..c6628f722a 100644 --- a/types/office-js/index.d.ts +++ b/types/office-js/index.d.ts @@ -6435,43 +6435,6 @@ declare namespace Office { * Important: This is an internal Outlook object, not directly exposed through existing interfaces. You should treat this as a mode of Office.context.mailbox.item. Refer to the [Object Model pages for more information](https://review.docs.microsoft.com/en-us/javascript/office/objectmodel/preview-requirement-set/office-item?branch=AlexJ-OMPreservation). */ interface Appointment extends Item { - /** - * Gets or sets the recurrence pattern of an appointment. Gets the recurrence pattern of a meeting request. Read and compose modes for appointment items. Read mode for meeting request items. - * - * The recurrence property returns a recurrence object for recurring appointments or meetings requests if an item is a series or an instance in a series. null is returned for single appointments and meeting requests of single appointments. undefined is returned for messages that are not meeting requests. - * - * Note: Meeting requests have an itemClass value of IPM.Schedule.Meeting.Request. - * - * Note: If the recurrence object is null, this indicates that the object is a single appointment or a meeting request of a single appointment and NOT a part of a series. - * - * [Api set: Mailbox Preview] - * - * @remarks - * - * Minimum permission level: ReadItem - * - * Applicable Outlook mode: Compose or read - */ - recurrence: Recurrence; - - /** - * Gets the id of the series that an instance belongs to. - * - * In OWA and Outlook, the seriesId returns the Exchange Web Services (EWS) ID of the parent (series) item that this item belongs to. However, in iOS and Android, the seriesId returns the REST ID of the parent item. - * - * Note: The identifier returned by the seriesId property is the same as the Exchange Web Services item identifier. The seriesId property is not identical to the Outlook IDs used by the Outlook REST API. Before making REST API calls using this value, it should be converted using Office.context.mailbox.convertToRestId. For more details, see [Use the Outlook REST APIs from an Outlook add-in](https://docs.microsoft.com/outlook/add-ins/use-rest-api). - * - * The seriesId property returns null for items that do not have parent items such as single appointments, series items, or meeting requests and returns undefined for any other items that are not meeting requests. - * - * [Api set: Mailbox Preview] - * - * @remarks - * - * Minimum permission level: ReadItem - * - * Applicable Outlook mode: Compose or read - */ - seriesId: string; } /** * Important: This is an internal Outlook object, not directly exposed through existing interfaces. You should treat this as a mode of Office.context.mailbox.item. Refer to the [Object Model pages for more information](https://review.docs.microsoft.com/en-us/javascript/office/objectmodel/preview-requirement-set/office-item?branch=AlexJ-OMPreservation). @@ -6570,11 +6533,26 @@ declare namespace Office { * Important: This is an internal Outlook object, not directly exposed through existing interfaces. You should treat this as a mode of Office.context.mailbox.item. Refer to the [Object Model pages for more information](https://review.docs.microsoft.com/en-us/javascript/office/objectmodel/preview-requirement-set/office-item?branch=AlexJ-OMPreservation). */ interface AppointmentRead extends Appointment, ItemRead { + /** + * Gets the date and time that the appointment is to end. + * + * The end property is expressed as a Coordinated Universal Time (UTC) date and time value. You can use the convertToLocalClientTime method to convert the end property value to the client's local date and time. + * + * The end property returns a Date object. + * + * When you use the Time.setAsync method to set the end time, you should use the convertToUtcClientTime method to convert the local time on the client to UTC for the server. + * + * [Api set: Mailbox 1.0] + * + * @remarks + * + * Minimum permission level: ReadItem + * + * Applicable Outlook mode: Compose or read + */ end: Date; /** - * Gets or sets the location of an appointment. - * - * *Read mode* + * Gets the location of an appointment. * * The location property returns a string that contains the location of the appointment. * @@ -6590,8 +6568,6 @@ declare namespace Office { /** * Provides access to the optional attendees of an event. The type of object and level of access depends on the mode of the current item. * - * *Read mode* - * * The optionalAttendees property returns an array that contains an EmailAddressDetails object for each optional attendee to the meeting. * * [Api set: Mailbox 1.0] @@ -6618,8 +6594,6 @@ declare namespace Office { /** * Provides access to the required attendees of an event. The type of object and level of access depends on the mode of the current item. * - * *Read mode* - * * The requiredAttendees property returns an array that contains an EmailAddressDetails object for each required attendee to the meeting. * * [Api set: Mailbox 1.0] @@ -6632,12 +6606,10 @@ declare namespace Office { */ requiredAttendees: EmailAddressDetails[]; /** - * Gets or sets the date and time that the appointment is to begin. + * Gets the date and time that the appointment is to begin. * * The start property is expressed as a Coordinated Universal Time (UTC) date and time value. You can use the convertToLocalClientTime method to convert the value to the client's local date and time. * - * *Read mode* - * * The start property returns a Date object. * * [Api set: Mailbox 1.0] @@ -6650,6 +6622,7 @@ declare namespace Office { */ start: Date; } + interface AppointmentForm { /** * Gets an object that provides methods for manipulating the body of an item. @@ -6871,6 +6844,44 @@ declare namespace Office { */ notificationMessages: NotificationMessages; + /** + * Gets or sets the recurrence pattern of an appointment. Gets the recurrence pattern of a meeting request. Read and compose modes for appointment items. Read mode for meeting request items. + * + * The recurrence property returns a recurrence object for recurring appointments or meetings requests if an item is a series or an instance in a series. null is returned for single appointments and meeting requests of single appointments. undefined is returned for messages that are not meeting requests. + * + * Note: Meeting requests have an itemClass value of IPM.Schedule.Meeting.Request. + * + * Note: If the recurrence object is null, this indicates that the object is a single appointment or a meeting request of a single appointment and NOT a part of a series. + * + * [Api set: Mailbox Preview] + * + * @remarks + * + * Minimum permission level: ReadItem + * + * Applicable Outlook mode: Compose or read + */ + recurrence: Recurrence; + + /** + * Gets the id of the series that an instance belongs to. + * + * In OWA and Outlook, the seriesId returns the Exchange Web Services (EWS) ID of the parent (series) item that this item belongs to. However, in iOS and Android, the seriesId returns the REST ID of the parent item. + * + * Note: The identifier returned by the seriesId property is the same as the Exchange Web Services item identifier. The seriesId property is not identical to the Outlook IDs used by the Outlook REST API. Before making REST API calls using this value, it should be converted using Office.context.mailbox.convertToRestId. For more details, see [Use the Outlook REST APIs from an Outlook add-in](https://docs.microsoft.com/outlook/add-ins/use-rest-api). + * + * The seriesId property returns null for items that do not have parent items such as single appointments, series items, or meeting requests and returns undefined for any other items that are not meeting requests. + * + * [Api set: Mailbox Preview] + * + * @remarks + * + * Minimum permission level: ReadItem + * + * Applicable Outlook mode: Compose or read + */ + seriesId: string; + /** * Adds an event handler for a supported event. * @@ -6980,8 +6991,6 @@ declare namespace Office { * * The subject property gets or sets the entire subject of the item, as sent by the email server. * - * *Compose mode* - * * The subject property returns a Subject object that provides methods to get and set the subject. * * [Api set: Mailbox 1.0] @@ -7638,12 +7647,10 @@ declare namespace Office { */ normalizedSubject: string; /** - * Gets or sets the description that appears in the subject field of an item. + * Gets the description that appears in the subject field of an item. * * The subject property gets or sets the entire subject of the item, as sent by the email server. * - * *Read mode* - * * The subject property returns a string. Use the normalizedSubject property to get the subject minus any leading prefixes such as RE: and FW:. * * [Api set: Mailbox 1.0] @@ -7915,9 +7922,7 @@ declare namespace Office { */ conversationId: string; } - /** - * Important: This is an internal Outlook object, not directly exposed through existing interfaces. You should treat this as a mode of Office.context.mailbox.item. Refer to the [Object Model pages for more information](https://review.docs.microsoft.com/en-us/javascript/office/objectmodel/preview-requirement-set/office-item?branch=AlexJ-OMPreservation). - */ + interface MessageCompose extends Message, ItemCompose { /** * Gets an object that provides methods to get or update the recipients on the Bcc (blind carbon copy) line of a message. Compose mode only. @@ -7966,8 +7971,6 @@ declare namespace Office { /** * Provides access to the recipients on the To line of a message. The type of object and level of access depends on the mode of the current item. * - * *Compose mode* - * * The to property returns a Recipients object that provides methods to get or update the recipients on the To line of the message. * * [Api set: Mailbox 1.0] @@ -7987,8 +7990,6 @@ declare namespace Office { /** * Provides access to the Cc (carbon copy) recipients of a message. The type of object and level of access depends on the mode of the current item. * - * *Read mode* - * * The cc property returns an array that contains an EmailAddressDetails object for each recipient listed on the Cc line of the message. The collection is limited to a maximum of 100 members. * * [Api set: Mailbox 1.0] @@ -8049,8 +8050,6 @@ declare namespace Office { /** * Provides access to the recipients on the To line of a message. The type of object and level of access depends on the mode of the current item. * - * *Read mode* - * * The to property returns an array that contains an EmailAddressDetails object for each recipient listed on the To line of the message. The collection is limited to a maximum of 100 members. * * [Api set: Mailbox 1.0] From 09831af230d8cda7def8214bdbf891ba90f0322f Mon Sep 17 00:00:00 2001 From: Joshua Goldberg Date: Tue, 5 Jun 2018 19:49:48 -0700 Subject: [PATCH 27/37] Added axe-webdriverjs typings with axe-core@3.0.3 --- notNeededPackages.json | 2 +- .../axe-webdriverjs/axe-webdriverjs-tests.ts | 31 +++++++++++++++++++ types/axe-webdriverjs/index.d.ts | 28 ++++++++++------- types/axe-webdriverjs/package.json | 3 +- types/axe-webdriverjs/tsconfig.json | 1 + types/jest-axe/package.json | 2 +- 6 files changed, 51 insertions(+), 16 deletions(-) diff --git a/notNeededPackages.json b/notNeededPackages.json index 4fb2ecedb3..a8c685e5e9 100644 --- a/notNeededPackages.json +++ b/notNeededPackages.json @@ -124,7 +124,7 @@ "libraryName": "axe-core", "typingsPackageName": "axe-core", "sourceRepoURL": "https://github.com/dequelabs/axe-core", - "asOfVersion": "2.0.7" + "asOfVersion": "3.0.3" }, { "libraryName": "axios", diff --git a/types/axe-webdriverjs/axe-webdriverjs-tests.ts b/types/axe-webdriverjs/axe-webdriverjs-tests.ts index e69de29bb2..47eeadc8c5 100644 --- a/types/axe-webdriverjs/axe-webdriverjs-tests.ts +++ b/types/axe-webdriverjs/axe-webdriverjs-tests.ts @@ -0,0 +1,31 @@ +import { Result, RunOptions, Spec } from "axe-core"; +import { AxeBuilder, AxeAnalysis } from "axe-webdriverjs"; +import { WebDriver } from "selenium-webdriver"; + +const inTest = async (webDriver: WebDriver) => { + const builderCalled: AxeBuilder = AxeBuilder(webDriver); + const builderNewed: AxeBuilder = new AxeBuilder(webDriver); + + const runOptions: RunOptions = {}; + const spec: Spec = {}; + + const analysis: AxeAnalysis = await AxeBuilder(webDriver) + .include("include") + .exclude("exclude") + .options(runOptions) + .withRules("rule") + .withRules(["rule", "rule"]) + .withTags("tag") + .withTags(["tag", "tag"]) + .disableRules("rule") + .disableRules(["rule", "rule"]) + .configure(spec) + .analyze((internalResults: AxeAnalysis) => {}); + + const inapplicable: Result[] = analysis.inapplicable; + const incomplete: Result[] = analysis.incomplete; + const passes: Result[] = analysis.passes; + const timestamp: string = analysis.timestamp; + const url: string = analysis.url; + const violations: Result[] = analysis.violations; +}; diff --git a/types/axe-webdriverjs/index.d.ts b/types/axe-webdriverjs/index.d.ts index d8e3979145..3c8ae27249 100644 --- a/types/axe-webdriverjs/index.d.ts +++ b/types/axe-webdriverjs/index.d.ts @@ -2,11 +2,12 @@ // Project: https://github.com/dequelabs/axe-webdriverjs#readme // Definitions by: My Self // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 import { Result, RunOptions, Spec } from "axe-core"; import { WebDriver } from "selenium-webdriver"; -export interface IAxeAnalysis { +export interface AxeAnalysis { inapplicable: Result[]; incomplete: Result[]; passes: Result[]; @@ -16,9 +17,6 @@ export interface IAxeAnalysis { } export interface AxeBuilder { - (driver: WebDriver): AxeBuilder; - new (driver: WebDriver): AxeBuilder; - /** * Includes a selector in analysis. * @@ -38,21 +36,22 @@ export interface AxeBuilder { * * @param options aXe options object. * @remarks Will override any other configured options, including calls to `withRules` and `withTags`. + * @see https://github.com/dequelabs/axe-core/issues/937 */ options(options: RunOptions): this; /** * Limits analysis to only the specified rules. - * + * * @param rules Array of rule IDs, or a single rule ID as a string. * @remarks Cannot be used with `withTags`. */ withRules(rules: string | string[]): this; /** - * Limist analysis to only the specified tags. + * Limist analysis to only the specified tags. * - * @param rules Array of tags, or a single tag as a string + * @param rules Array of tags, or a single tag as a string. * @remarks Cannot be used with `withRules`. */ withTags(tags: string | string[]): this; @@ -60,7 +59,7 @@ export interface AxeBuilder { /** * Set the list of rules to skip when running an analysis * - * @param rules Array of rule IDs, or a single rule ID as a string + * @param rules Array of rule IDs, or a single rule ID as a string. */ disableRules(rules: string | string[]): this; @@ -72,8 +71,13 @@ export interface AxeBuilder { configure(config: Spec): this; /** - * Perform analysis and retrieve results. - * @param callback Function to execute when analysis completes. - */ - analyze(callback: (results: IAxeAnalysis) => void): Promise; + * Perform analysis and retrieve results. + * @param callback Function to execute when analysis completes. + */ + analyze(callback: (results: AxeAnalysis) => void): Promise; } + +export const AxeBuilder: { + (driver: WebDriver): AxeBuilder; + new (driver: WebDriver): AxeBuilder; +}; diff --git a/types/axe-webdriverjs/package.json b/types/axe-webdriverjs/package.json index 5d94289f3b..e4e88ef33a 100644 --- a/types/axe-webdriverjs/package.json +++ b/types/axe-webdriverjs/package.json @@ -1,7 +1,6 @@ { "private": true, "dependencies": { - "@types/selenium-webdriver": "^3.0.0", - "axe-core": "^2.6.1" + "axe-core": "^3.0.3" } } diff --git a/types/axe-webdriverjs/tsconfig.json b/types/axe-webdriverjs/tsconfig.json index efa6dfcf98..d8637d03e4 100644 --- a/types/axe-webdriverjs/tsconfig.json +++ b/types/axe-webdriverjs/tsconfig.json @@ -6,6 +6,7 @@ ], "noImplicitAny": true, "noImplicitThis": true, + "strictFunctionTypes": true, "strictNullChecks": true, "baseUrl": "../", "typeRoots": [ diff --git a/types/jest-axe/package.json b/types/jest-axe/package.json index d9427293a7..e4e88ef33a 100644 --- a/types/jest-axe/package.json +++ b/types/jest-axe/package.json @@ -1,6 +1,6 @@ { "private": true, "dependencies": { - "axe-core": "^2.6.1" + "axe-core": "^3.0.3" } } From c218dd1c27ee933d85b68d1c82d0365e511ab7e8 Mon Sep 17 00:00:00 2001 From: Bao Hua Date: Wed, 6 Jun 2018 15:29:08 +0800 Subject: [PATCH 28/37] add cancel prop on IchooseImage --- types/jweixin/index.d.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/types/jweixin/index.d.ts b/types/jweixin/index.d.ts index 6db4ac213f..b656e81ecc 100644 --- a/types/jweixin/index.d.ts +++ b/types/jweixin/index.d.ts @@ -210,6 +210,7 @@ declare namespace wx { localIds: string[]; errMsg: string; }): void; + cancel(): void; } /** * 从本地相册选择图片或使用相机拍照。 From c9faff23d973957542632073f3ce3c578cda96b2 Mon Sep 17 00:00:00 2001 From: asaarnak Date: Wed, 6 Jun 2018 11:14:25 +0300 Subject: [PATCH 29/37] Fix OnInputChangeHandler type. https://github.com/JedWatson/react-select/tree/v1.2.1#updating-input-values-with-oninputchange --- types/react-select/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/react-select/index.d.ts b/types/react-select/index.d.ts index e2a0520154..6d8bc6d8c7 100644 --- a/types/react-select/index.d.ts +++ b/types/react-select/index.d.ts @@ -40,7 +40,7 @@ export type FilterOptionsHandler = (options: Options HandlerRendererResult; export type MenuRendererHandler = (props: MenuRendererProps) => HandlerRendererResult; export type OnCloseHandler = () => void; -export type OnInputChangeHandler = (inputValue: string) => void; +export type OnInputChangeHandler = (inputValue: string) => string; export type OnInputKeyDownHandler = React.KeyboardEventHandler; export type OnMenuScrollToBottomHandler = () => void; export type OnOpenHandler = () => void; From e51382786f7d9f7f924ab6d3d22f5998cdbb379e Mon Sep 17 00:00:00 2001 From: Claas Ahlrichs Date: Wed, 6 Jun 2018 11:16:30 +0200 Subject: [PATCH 30/37] added Claas Ahlrichs to "Definitions By" --- types/xml2js/index.d.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/types/xml2js/index.d.ts b/types/xml2js/index.d.ts index 1875399e23..42fc669da4 100644 --- a/types/xml2js/index.d.ts +++ b/types/xml2js/index.d.ts @@ -5,6 +5,7 @@ // Christopher Currens // Edward Hinkle // Behind The Math +// Claas Ahlrichs // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped /// From a132409be6236cf39560ccb4367f06118e14e0c1 Mon Sep 17 00:00:00 2001 From: Claas Ahlrichs Date: Wed, 6 Jun 2018 11:43:49 +0200 Subject: [PATCH 31/37] updated version number and declared "name" parameter as optional --- types/xml2js/index.d.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/types/xml2js/index.d.ts b/types/xml2js/index.d.ts index 42fc669da4..4a123a2f03 100644 --- a/types/xml2js/index.d.ts +++ b/types/xml2js/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for node-xml2js 0.4 +// Type definitions for node-xml2js 0.4.6 // Project: https://github.com/Leonidas-from-XIV/node-xml2js // Definitions by: Michel Salib // Jason McNeil @@ -35,7 +35,7 @@ export interface Options { async?: boolean; attrkey?: string; attrNameProcessors?: Array<(name: string) => any>; - attrValueProcessors?: Array<(value: string, name: string) => any>; + attrValueProcessors?: Array<(value: string, name?: string) => any>; charkey?: string; charsAsChildren?: boolean; childkey?: string; @@ -53,7 +53,7 @@ export interface Options { tagNameProcessors?: Array<(name: string) => any>; trim?: boolean; validator?: Function; - valueProcessors?: Array<(value: string, name: string) => any>; + valueProcessors?: Array<(value: string, name?: string) => any>; xmlns?: boolean; } From d8b2358f2a0b7882509cfb7303a3f1effb301f7b Mon Sep 17 00:00:00 2001 From: Claas Ahlrichs Date: Wed, 6 Jun 2018 11:52:30 +0200 Subject: [PATCH 32/37] Expected: foo MAJOR.MINOR (patch version not allowed) --- types/xml2js/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/xml2js/index.d.ts b/types/xml2js/index.d.ts index 4a123a2f03..bc8250af19 100644 --- a/types/xml2js/index.d.ts +++ b/types/xml2js/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for node-xml2js 0.4.6 +// Type definitions for node-xml2js 0.4 // Project: https://github.com/Leonidas-from-XIV/node-xml2js // Definitions by: Michel Salib // Jason McNeil From 6f72c2699daedc2abaed3b71d1b6ff9feecaf6de Mon Sep 17 00:00:00 2001 From: Claas Ahlrichs Date: Wed, 6 Jun 2018 12:22:35 +0200 Subject: [PATCH 33/37] REVERTED: declared "name" parameter as optional --- types/xml2js/index.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/types/xml2js/index.d.ts b/types/xml2js/index.d.ts index bc8250af19..42fc669da4 100644 --- a/types/xml2js/index.d.ts +++ b/types/xml2js/index.d.ts @@ -35,7 +35,7 @@ export interface Options { async?: boolean; attrkey?: string; attrNameProcessors?: Array<(name: string) => any>; - attrValueProcessors?: Array<(value: string, name?: string) => any>; + attrValueProcessors?: Array<(value: string, name: string) => any>; charkey?: string; charsAsChildren?: boolean; childkey?: string; @@ -53,7 +53,7 @@ export interface Options { tagNameProcessors?: Array<(name: string) => any>; trim?: boolean; validator?: Function; - valueProcessors?: Array<(value: string, name?: string) => any>; + valueProcessors?: Array<(value: string, name: string) => any>; xmlns?: boolean; } From 3d4bf4345d5292e7dcbf6f36dcab3b05645713cd Mon Sep 17 00:00:00 2001 From: Stephen Allred Date: Wed, 6 Jun 2018 12:34:12 +0100 Subject: [PATCH 34/37] Added missing maxBarThickness Added missing maxBarThickness to the CommonAxe interface --- types/chart.js/index.d.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/types/chart.js/index.d.ts b/types/chart.js/index.d.ts index 923af5583e..cb3db72855 100644 --- a/types/chart.js/index.d.ts +++ b/types/chart.js/index.d.ts @@ -514,6 +514,7 @@ declare namespace Chart { ticks?: TickOptions; gridLines?: GridLineOptions; barThickness?: number; + maxBarThickness?: number; scaleLabel?: ScaleTitleOptions; offset?: boolean; beforeUpdate?(scale?: any): void; From cc2065ff1f30e1144ccaaf1fda4fc894de5c9c22 Mon Sep 17 00:00:00 2001 From: Alex Jerabek Date: Wed, 6 Jun 2018 08:27:37 -0700 Subject: [PATCH 35/37] Documenting the ReplyFormData and ReplyFormAttachment types --- types/office-js/index.d.ts | 50 ++++++++++++++++++++++++++------------ 1 file changed, 34 insertions(+), 16 deletions(-) diff --git a/types/office-js/index.d.ts b/types/office-js/index.d.ts index c6628f722a..dc122635c1 100644 --- a/types/office-js/index.d.ts +++ b/types/office-js/index.d.ts @@ -7682,14 +7682,7 @@ declare namespace Office { * * @param formData A string that contains text and HTML and that represents the body of the reply form. The string is limited to 32 KB * OR - * An object that contains body or attachment data and a callback function - * htmlBody: A string that contains text and HTML and that represents the body of the reply form. The string is limited to 32 KB. - * attachments: An array of JSON objects that are either file or item attachments. - * attachments.type: Indicates the type of attachment. Must be file for a file attachment or item for an item attachment. - * attachments.name: A string that contains the name of the attachment, up to 255 characters in length. - * attachments.url: Only used if type is set to file. The URI of the location for the file. - * attachments.isLine: Only used if type is set to file. If true, indicates that the attachment will be shown inline in the message body, and should not be displayed in the attachment list. - * attachments.itemId: Only used if type is set to item. The EWS item id of the attachment. This is a string up to 100 characters. + * A ReplyFormData object that contains body or attachment data and a callback function */ displayReplyAllForm(formData: string | ReplyFormData): void; /** @@ -7713,14 +7706,7 @@ declare namespace Office { * * @param formData A string that contains text and HTML and that represents the body of the reply form. The string is limited to 32 KB. * OR - * An object that contains body or attachment data and a callback function. The object is defined as follows. - * htmlBody: A string that contains text and HTML and that represents the body of the reply form. The string is limited to 32 KB. - * attachments: An array of JSON objects that are either file or item attachments. - * attachments.type: Indicates the type of attachment. Must be file for a file attachment or item for an item attachment. - * attachments.name: A string that contains the name of the attachment, up to 255 characters in length. - * attachments.url: Only used if type is set to file. The URI of the location for the file. - * attachments.isLine: Only used if type is set to file. If true, indicates that the attachment will be shown inline in the message body, and should not be displayed in the attachment list. - * attachments.itemId: Only used if type is set to item. The EWS item id of the attachment. This is a string up to 100 characters. + * A ReplyFormData object that contains body or attachment data and a callback function. */ displayReplyForm(formData: string | ReplyFormData): void; /** @@ -9401,15 +9387,47 @@ declare namespace Office { firstDayOfWeek: MailboxEnums.Days; } + /** + * A file or item attachment. Used when displaying a reply form + */ export interface ReplyFormAttachment { + /** + * Indicates the type of attachment. Must be file for a file attachment or item for an item attachment. + */ type: string; + /** + * A string that contains the name of the attachment, up to 255 characters in length. + */ name: string; + /** + * Only used if type is set to file. The URI of the location for the file. + */ url?: string; + /** + * Only used if type is set to file. If true, indicates that the attachment will be shown inline in the message body, and should not be displayed in the attachment list. + */ + inLine?: boolean; + /** + * Only used if type is set to item. The EWS item id of the attachment. This is a string up to 100 characters. + */ itemId?: string; } + + /** + * A ReplyFormData object that contains body or attachment data and a callback function. Used when displaying a reply form. + */ interface ReplyFormData { + /** + * A string that contains text and HTML and that represents the body of the reply form. The string is limited to 32 KB. + */ htmlBody?: string; + /** + * An array of ReplyFormAttachments that are either file or item attachments. + */ attachments?: ReplyFormAttachment[]; + /** + * When the method completes, the function passed in the callback parameter is called with a single parameter, asyncResult, which is an AsyncResult object. On success, the initialization data is provided in the asyncResult.value property as a string. If there is no initialization context, the asyncResult object will contain an Error object with its code property set to 9020 and its name property set to GenericResponseError. + */ callback?: (result: AsyncResult) => void; } /** From 10af13f86145337bfc346b277fd00eb88c8919c9 Mon Sep 17 00:00:00 2001 From: Alex Jerabek Date: Wed, 6 Jun 2018 11:23:05 -0700 Subject: [PATCH 36/37] Correcting callback description --- types/office-js/index.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/types/office-js/index.d.ts b/types/office-js/index.d.ts index dc122635c1..93cf3ee07a 100644 --- a/types/office-js/index.d.ts +++ b/types/office-js/index.d.ts @@ -9388,7 +9388,7 @@ declare namespace Office { } /** - * A file or item attachment. Used when displaying a reply form + * A file or item attachment. Used when displaying a reply form. */ export interface ReplyFormAttachment { /** @@ -9426,7 +9426,7 @@ declare namespace Office { */ attachments?: ReplyFormAttachment[]; /** - * When the method completes, the function passed in the callback parameter is called with a single parameter, asyncResult, which is an AsyncResult object. On success, the initialization data is provided in the asyncResult.value property as a string. If there is no initialization context, the asyncResult object will contain an Error object with its code property set to 9020 and its name property set to GenericResponseError. + * When the reply display call completes, the function passed in the callback parameter is called with a single parameter, asyncResult, which is an AsyncResult object. */ callback?: (result: AsyncResult) => void; } From 84137149e466c9964c8dd56d72b7e395ea104ac2 Mon Sep 17 00:00:00 2001 From: Alex Jerabek Date: Wed, 6 Jun 2018 11:41:49 -0700 Subject: [PATCH 37/37] Correcting callback description --- types/office-js/index.d.ts | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/types/office-js/index.d.ts b/types/office-js/index.d.ts index 93cf3ee07a..5af6916816 100644 --- a/types/office-js/index.d.ts +++ b/types/office-js/index.d.ts @@ -6432,12 +6432,12 @@ declare namespace Office { } /** - * Important: This is an internal Outlook object, not directly exposed through existing interfaces. You should treat this as a mode of Office.context.mailbox.item. Refer to the [Object Model pages for more information](https://review.docs.microsoft.com/en-us/javascript/office/objectmodel/preview-requirement-set/office-item?branch=AlexJ-OMPreservation). + * Important: This is an internal Outlook object, not directly exposed through existing interfaces. You should treat this as a mode of Office.context.mailbox.item. Refer to the Object Model pages for more information. */ interface Appointment extends Item { } /** - * Important: This is an internal Outlook object, not directly exposed through existing interfaces. You should treat this as a mode of Office.context.mailbox.item. Refer to the [Object Model pages for more information](https://review.docs.microsoft.com/en-us/javascript/office/objectmodel/preview-requirement-set/office-item?branch=AlexJ-OMPreservation). + * Important: This is an internal Outlook object, not directly exposed through existing interfaces. You should treat this as a mode of Office.context.mailbox.item. Refer to the Object Model pages for more information. */ interface AppointmentCompose extends Appointment, ItemCompose { /** @@ -6530,7 +6530,7 @@ declare namespace Office { start: Time; } /** - * Important: This is an internal Outlook object, not directly exposed through existing interfaces. You should treat this as a mode of Office.context.mailbox.item. Refer to the [Object Model pages for more information](https://review.docs.microsoft.com/en-us/javascript/office/objectmodel/preview-requirement-set/office-item?branch=AlexJ-OMPreservation). + * Important: This is an internal Outlook object, not directly exposed through existing interfaces. You should treat this as a mode of Office.context.mailbox.item. Refer to the Object Model pages for more information. */ interface AppointmentRead extends Appointment, ItemRead { /** @@ -6983,7 +6983,7 @@ declare namespace Office { removeHandlerAsync(eventType:EventType, handler: any, callback?: (result: AsyncResult) => void): void; } /** - * Important: This is an internal Outlook object, not directly exposed through existing interfaces. You should treat this as a mode of Office.context.mailbox.item. Refer to the [Object Model pages for more information](https://review.docs.microsoft.com/en-us/javascript/office/objectmodel/preview-requirement-set/office-item?branch=AlexJ-OMPreservation). + * Important: This is an internal Outlook object, not directly exposed through existing interfaces. You should treat this as a mode of Office.context.mailbox.item. Refer to the Object Model pages for more information. */ interface ItemCompose extends Item { /** @@ -7577,7 +7577,7 @@ declare namespace Office { setSelectedDataAsync(data: string, callback: (result: AsyncResult) => void): void; } /** - * Important: This is an internal Outlook object, not directly exposed through existing interfaces. You should treat this as a mode of Office.context.mailbox.item. Refer to the [Object Model pages for more information](https://review.docs.microsoft.com/en-us/javascript/office/objectmodel/preview-requirement-set/office-item?branch=AlexJ-OMPreservation). + * Important: This is an internal Outlook object, not directly exposed through existing interfaces. You should treat this as a mode of Office.context.mailbox.item. Refer to the Object Model pages for more information. */ interface ItemRead extends Item { /** @@ -7888,7 +7888,7 @@ declare namespace Office { getSelectedRegExMatches(): any; } /** - * Important: This is an internal Outlook object, not directly exposed through existing interfaces. You should treat this as a mode of Office.context.mailbox.item. Refer to the [Object Model pages for more information](https://review.docs.microsoft.com/en-us/javascript/office/objectmodel/preview-requirement-set/office-item?branch=AlexJ-OMPreservation). + * Important: This is an internal Outlook object, not directly exposed through existing interfaces. You should treat this as a mode of Office.context.mailbox.item. Refer to the Object Model pages for more information. */ interface Message extends Item { /** @@ -7909,6 +7909,9 @@ declare namespace Office { conversationId: string; } + /** + * Important: This is an internal Outlook object, not directly exposed through existing interfaces. You should treat this as a mode of Office.context.mailbox.item. Refer to the Object Model pages for more information. + */ interface MessageCompose extends Message, ItemCompose { /** * Gets an object that provides methods to get or update the recipients on the Bcc (blind carbon copy) line of a message. Compose mode only. @@ -7970,7 +7973,7 @@ declare namespace Office { to: Recipients; } /** - * Important: This is an internal Outlook object, not directly exposed through existing interfaces. You should treat this as a mode of Office.context.mailbox.item. Refer to the [Object Model pages for more information](https://review.docs.microsoft.com/en-us/javascript/office/objectmodel/preview-requirement-set/office-item?branch=AlexJ-OMPreservation). + * Important: This is an internal Outlook object, not directly exposed through existing interfaces. You should treat this as a mode of Office.context.mailbox.item. Refer to the Object Model pages for more information. */ interface MessageRead extends Message, ItemRead { /**