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('