mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-02-24 09:42:43 +00:00
Allow stringifying any type of object
Previously was limited only to plain objects
This commit is contained in:
parent
c3daad4d05
commit
51fa4f7362
5
query-string/query-string.d.ts
vendored
5
query-string/query-string.d.ts
vendored
@ -4,8 +4,7 @@
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
declare module "query-string" {
|
||||
type value = string | boolean | number;
|
||||
|
||||
|
||||
interface StringifyOptions { strict?: boolean; encode?: boolean; }
|
||||
|
||||
/**
|
||||
@ -20,7 +19,7 @@ declare module "query-string" {
|
||||
*
|
||||
* @param obj
|
||||
*/
|
||||
export function stringify(obj: { [key: string]: value | value[] }, options?: StringifyOptions): string;
|
||||
export function stringify(obj: any, options?: StringifyOptions): string;
|
||||
|
||||
/**
|
||||
* Extract a query string from a URL that can be passed into .parse().
|
||||
|
||||
Loading…
Reference in New Issue
Block a user