mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-11 20:40:20 +00:00
qs definitions
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
/// <reference path="./qs.d.ts" />
|
||||
|
||||
import qs = require('qs');
|
||||
|
||||
qs.stringify({ a: 'b' });
|
||||
qs.stringify({ a: 'b', c: 'd' }, { delimiter: '&' });
|
||||
|
||||
qs.parse('a=b');
|
||||
qs.parse('a=b&c=d', { delimiter: '&' });
|
||||
Vendored
+35
@@ -0,0 +1,35 @@
|
||||
// Type definitions for qs
|
||||
// Project: https://github.com/hapijs/qs
|
||||
// Definitions by: Roman Korneev <https://github.com/RWander>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
declare module QueryString {
|
||||
interface IStringifyOptions {
|
||||
delimiter?: string;
|
||||
strictNullHandling?: boolean;
|
||||
skipNulls?: boolean;
|
||||
encode?: boolean;
|
||||
filter?: any;
|
||||
arrayFormat?: any;
|
||||
indices?: string;
|
||||
}
|
||||
|
||||
interface IParseOptions {
|
||||
delimiter?: string;
|
||||
depth?: number;
|
||||
arrayLimit?: number;
|
||||
parseArrays?: boolean;
|
||||
allowDots?: boolean;
|
||||
plainObjects?: boolean;
|
||||
allowPrototypes?: boolean;
|
||||
parameterLimit?: number;
|
||||
strictNullHandling?: boolean;
|
||||
}
|
||||
|
||||
export function stringify(obj: any, options?: IStringifyOptions): string;
|
||||
export function parse(str: string, options?: IParseOptions): any;
|
||||
}
|
||||
|
||||
declare module "qs" {
|
||||
export = QueryString;
|
||||
}
|
||||
Reference in New Issue
Block a user