forked from DefinitelyTyped/DefinitelyTyped
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathquery-string.d.ts
27 lines (24 loc) · 844 Bytes
/
query-string.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
// Type definitions for query-string v3.0.0
// Project: https://github.com/sindresorhus/query-string
// Definitions by: Sam Verschueren <https://github.com/SamVerschueren>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
declare module "query-string" {
/**
* Parse a query string into an object.
* Leading ? or # are ignored, so you can pass location.search or location.hash directly.
* @param str
*/
export function parse(str: string): any;
/**
* Stringify an object into a query string, sorting the keys.
*
* @param obj
*/
export function stringify(obj: any, options?: {strict: boolean}): string;
/**
* Extract a query string from a URL that can be passed into .parse().
*
* @param str
*/
export function extract(str: string): string;
}