mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-24 05:06:02 +08:00
[query-string] Update definitions for 6.1
This commit is contained in:
4
types/query-string/index.d.ts
vendored
4
types/query-string/index.d.ts
vendored
@@ -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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -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');
|
||||
|
||||
Reference in New Issue
Block a user