From ffbf9da05fd9fe404a250586b15b7a3276bfe7cc Mon Sep 17 00:00:00 2001 From: Brian Crowell Date: Tue, 10 Jul 2018 11:39:22 -0500 Subject: [PATCH 1/5] chai-http: Add methods keepOpen() and close() to the agent (#27153) keepOpen() and close() are available both on the base request and on the agent for controlling the lifetime of the server. --- types/chai-http/chai-http-tests.ts | 6 ++++++ types/chai-http/index.d.ts | 2 ++ 2 files changed, 8 insertions(+) diff --git a/types/chai-http/chai-http-tests.ts b/types/chai-http/chai-http-tests.ts index 882f089a47..37a4df794e 100644 --- a/types/chai-http/chai-http-tests.ts +++ b/types/chai-http/chai-http-tests.ts @@ -84,6 +84,10 @@ chai.request(app) .then((res: ChaiHttp.Response) => chai.expect(res).to.have.status(200)) .catch((err: any) => { throw err; }); +chai.request(app) + .keepOpen() + .close((err: any) => { throw err; }); + const agent = chai.request.agent(app); agent @@ -97,6 +101,8 @@ agent .then((res: ChaiHttp.Response) => chai.expect(res).to.have.status(200)); }); +agent.close((err: any) => { throw err; }); + function test1() { const req = chai.request(app).get('/'); req.then((res: ChaiHttp.Response) => { diff --git a/types/chai-http/index.d.ts b/types/chai-http/index.d.ts index 77c711cb7f..de3caa13e7 100644 --- a/types/chai-http/index.d.ts +++ b/types/chai-http/index.d.ts @@ -64,6 +64,8 @@ declare global { del(url: string, callback?: (err: any, res: Response) => void): request.Request; options(url: string, callback?: (err: any, res: Response) => void): request.Request; patch(url: string, callback?: (err: any, res: Response) => void): request.Request; + keepOpen(): Agent; + close(callback?: (err: any) => void): Agent; } interface TypeComparison { From 68a7fcd294ee873364180fecdcad3c6548631543 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A1szl=C3=B3=20Zsolt=20Nagy?= Date: Tue, 10 Jul 2018 18:48:55 +0200 Subject: [PATCH 2/5] add missing searchTypeText property to react-select (#27060) --- types/react-select/index.d.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/types/react-select/index.d.ts b/types/react-select/index.d.ts index 3d48d36e2e..377dad4495 100644 --- a/types/react-select/index.d.ts +++ b/types/react-select/index.d.ts @@ -623,6 +623,10 @@ export interface ReactAsyncSelectProps extends ReactSelec * replaces the placeholder while options are loading */ loadingPlaceholder?: string | JSX.Element; + /** + * displayed in the drop down list when the user did not type anything yet + */ + searchPromptText?: string; } export type ReactAsyncCreatableSelectProps = ReactAsyncSelectProps & ReactCreatableSelectProps; From bc51af99607c4a2481b4f6f942e73a0daa3f7134 Mon Sep 17 00:00:00 2001 From: Emil Laine Date: Tue, 10 Jul 2018 19:51:09 +0300 Subject: [PATCH 3/5] Fix i18next dir() return type to be "ltr" | "rtl" (#27069) --- types/i18next/index.d.ts | 2 +- types/i18next/v2/index.d.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/types/i18next/index.d.ts b/types/i18next/index.d.ts index 61b59b32e1..7674762de6 100644 --- a/types/i18next/index.d.ts +++ b/types/i18next/index.d.ts @@ -493,7 +493,7 @@ declare namespace i18next { /** * Returns rtl or ltr depending on languages read direction. */ - dir(lng?: string): void; + dir(lng?: string): "ltr" | "rtl"; /** * Exposes interpolation.format function added on init. diff --git a/types/i18next/v2/index.d.ts b/types/i18next/v2/index.d.ts index f9bd900e77..b67a5f9423 100644 --- a/types/i18next/v2/index.d.ts +++ b/types/i18next/v2/index.d.ts @@ -128,7 +128,7 @@ declare namespace i18n { loadLanguages(lngs: string[], callback?: () => void): void; - dir(lng?: string): string; + dir(lng?: string): "ltr" | "rtl"; createInstance(options?: Options, callback?: (err: any, t: TranslationFunction) => void): I18n; From 375fd64a08e657a77dd89975221b04b7d518c475 Mon Sep 17 00:00:00 2001 From: kukiel Date: Tue, 10 Jul 2018 18:51:34 +0200 Subject: [PATCH 4/5] Mapbox popup className option (#27068) * added mapbox-gl popup className option * added mapbox-gl popup className option test --- types/mapbox-gl/index.d.ts | 2 ++ types/mapbox-gl/mapbox-gl-tests.ts | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/types/mapbox-gl/index.d.ts b/types/mapbox-gl/index.d.ts index 4cfdf986bf..5f64b7470b 100644 --- a/types/mapbox-gl/index.d.ts +++ b/types/mapbox-gl/index.d.ts @@ -464,6 +464,8 @@ declare namespace mapboxgl { anchor?: Anchor; offset?: number | PointLike | { [key: string]: PointLike; }; + + className?: string; } export interface Style { diff --git a/types/mapbox-gl/mapbox-gl-tests.ts b/types/mapbox-gl/mapbox-gl-tests.ts index fa62007088..87297effda 100644 --- a/types/mapbox-gl/mapbox-gl-tests.ts +++ b/types/mapbox-gl/mapbox-gl-tests.ts @@ -225,7 +225,7 @@ map.addLayer({ /** * Popup */ -var popup = new mapboxgl.Popup({closeOnClick: false, closeButton: true, anchor: 'top-right', offset: {'top': [0,0], 'bottom': [25,-50]} }) +var popup = new mapboxgl.Popup({closeOnClick: false, closeButton: true, anchor: 'top-right', offset: {'top': [0,0], 'bottom': [25,-50]}, className: 'custom-class' }) .setLngLat([-50, 50]) .setHTML('

Hello World!

') .addTo(map); From 981fcd2f64b4e8f1d8991b0a0697029d61235997 Mon Sep 17 00:00:00 2001 From: Michael Ferris Date: Tue, 10 Jul 2018 16:20:25 -0700 Subject: [PATCH 5/5] yargs (#27171) Add `hide` method according to http://yargs.js.org/docs/#api-hidekey Add `showhidden` method according to http://yargs.js.org/docs/#api-showhidden --- types/yargs/index.d.ts | 7 ++++++- types/yargs/yargs-tests.ts | 13 +++++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/types/yargs/index.d.ts b/types/yargs/index.d.ts index 882e8e9999..50901570a4 100644 --- a/types/yargs/index.d.ts +++ b/types/yargs/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for yargs 11.0 +// Type definitions for yargs 11.1 // Project: https://github.com/chevex/yargs // Definitions by: Martin Poelstra // Mizunashi Mana @@ -116,6 +116,8 @@ declare namespace yargs { group(key: string | string[], groupName: string): Argv; + hide(key: string): Argv; + help(): Argv; help(enableExplicit: boolean): Argv; help(option: string, enableExplicit: boolean): Argv; @@ -185,6 +187,9 @@ declare namespace yargs { showCompletionScript(): Argv; + showhidden(option?: string | boolean): Argv; + showhidden(option: string, description?: string): Argv; + showHelp(consoleLevel?: string): Argv; showHelpOnFail(enable: boolean, message?: string): Argv; diff --git a/types/yargs/yargs-tests.ts b/types/yargs/yargs-tests.ts index 43779309bf..f98120d1c4 100644 --- a/types/yargs/yargs-tests.ts +++ b/types/yargs/yargs-tests.ts @@ -648,3 +648,16 @@ function Argv$check() { .check((argv, aliases) => void 0) .check((argv, aliases) => void 0, false); } + +function Argv$hide() { + const ya = yargs + .hide('a'); +} + +function Argv$showhidden() { + const ya = yargs + .showhidden() + .showhidden(true) + .showhidden('show-hidden') + .showhidden('show-hidden', 'Show hidden options'); +}