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 { 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; 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); 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; 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'); +}