[query-string] Update definitions for 6.1

This commit is contained in:
Josh Holmer
2018-06-16 23:28:26 -04:00
parent 10fe633823
commit 8900f2e6aa
2 changed files with 4 additions and 1 deletions

View File

@@ -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 <https://github.com/SamVerschueren>
// Tanguy Krotoff <https://github.com/tkrotoff>
// HuHuanming <https://github.com/huhuanming>
// Madara Uchiha <https://github.com/MadaraUchiha>
// Josh Holmer <https://github.com/shssoichiro>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.2
export interface ParseOptions {
arrayFormat?: 'bracket' | 'index' | 'none';
decode?: boolean;
}
/**

View File

@@ -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');