From 8900f2e6aafa5c66ba365721bf39e955a76ad535 Mon Sep 17 00:00:00 2001 From: Josh Holmer Date: Sat, 16 Jun 2018 23:28:26 -0400 Subject: [PATCH] [query-string] Update definitions for 6.1 --- types/query-string/index.d.ts | 4 +++- types/query-string/query-string-tests.ts | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/types/query-string/index.d.ts b/types/query-string/index.d.ts index db823e67d2..8a2f4a30ea 100644 --- a/types/query-string/index.d.ts +++ b/types/query-string/index.d.ts @@ -1,14 +1,16 @@ -// Type definitions for query-string 5.1 +// Type definitions for query-string 6.1 // Project: https://github.com/sindresorhus/query-string // Definitions by: Sam Verschueren // Tanguy Krotoff // HuHuanming // Madara Uchiha +// Josh Holmer // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.2 export interface ParseOptions { arrayFormat?: 'bracket' | 'index' | 'none'; + decode?: boolean; } /** diff --git a/types/query-string/query-string-tests.ts b/types/query-string/query-string-tests.ts index 6e948cf6e5..69c70655ed 100644 --- a/types/query-string/query-string-tests.ts +++ b/types/query-string/query-string-tests.ts @@ -24,6 +24,7 @@ import * as queryString from 'query-string'; let fooBar: { foo: 'bar' }; fooBar = queryString.parse('?foo=bar'); fooBar = queryString.parse('#foo=bar'); + fooBar = queryString.parse('?foo=bar%20baz', { decode: true }); let fooBarBaz: { foo: ['bar', 'baz'] }; fooBarBaz = queryString.parse('&foo=bar&foo=baz');