mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-12-04 12:11:47 +00:00
stage changes to index.d.ts
This commit is contained in:
Vendored
+6
-2
@@ -4,19 +4,23 @@
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
|
||||
type value = string | boolean | number;
|
||||
|
||||
interface StringifyOptions { strict?: boolean; encode?: boolean; }
|
||||
|
||||
/**
|
||||
* Parse a query string into an object.
|
||||
* Leading ? or # are ignored, so you can pass location.search or location.hash directly.
|
||||
* @param str
|
||||
*/
|
||||
export declare function parse(str: string): any;
|
||||
export declare function parse(str: string): { [key: string]: string | string[] };
|
||||
|
||||
/**
|
||||
* Stringify an object into a query string, sorting the keys.
|
||||
*
|
||||
* @param obj
|
||||
*/
|
||||
export declare function stringify(obj: any, options?: { strict: boolean }): string;
|
||||
export declare function stringify(obj: { [key: string]: value | value[] }, options?: StringifyOptions): string;
|
||||
|
||||
/**
|
||||
* Extract a query string from a URL that can be passed into .parse().
|
||||
|
||||
Reference in New Issue
Block a user