diff --git a/types/qs/index.d.ts b/types/qs/index.d.ts index 2ecbed14be..2a3b10a273 100644 --- a/types/qs/index.d.ts +++ b/types/qs/index.d.ts @@ -5,6 +5,7 @@ // Belinda Teh // Melvin Lee // Arturs Vonda +// Carlos Bonetti // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped export = QueryString; @@ -25,6 +26,7 @@ declare namespace QueryString { format?: 'RFC1738' | 'RFC3986'; encodeValuesOnly?: boolean; addQueryPrefix?: boolean; + allowDots?: boolean; } interface IParseOptions { diff --git a/types/qs/qs-tests.ts b/types/qs/qs-tests.ts index 49fe89a4aa..2054292a1f 100644 --- a/types/qs/qs-tests.ts +++ b/types/qs/qs-tests.ts @@ -287,3 +287,7 @@ qs.parse('a=b&c=d', { delimiter: '&' }); () => { assert.equal(qs.stringify({ a: 'b' }, { addQueryPrefix: true }), '?a=b'); } + +() => { + assert.equal(qs.stringify({ a: { b: { c: 'd', e: 'f' } } }, { allowDots: true }), 'a.b.c=d&a.b.e=f'); +}