Allow stringifying any type of object

Previously was limited only to plain objects
This commit is contained in:
Michael Klein 2016-11-29 19:17:32 +01:00 committed by GitHub
parent c3daad4d05
commit 51fa4f7362

View File

@ -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().