File tree 2 files changed +44
-0
lines changed 2 files changed +44
-0
lines changed Original file line number Diff line number Diff line change
1
+ /// <reference path="./qs.d.ts" />
2
+
3
+ import qs = require( 'qs' ) ;
4
+
5
+ qs . stringify ( { a : 'b' } ) ;
6
+ qs . stringify ( { a : 'b' , c : 'd' } , { delimiter : '&' } ) ;
7
+
8
+ qs . parse ( 'a=b' ) ;
9
+ qs . parse ( 'a=b&c=d' , { delimiter : '&' } ) ;
Original file line number Diff line number Diff line change
1
+ // Type definitions for qs
2
+ // Project: https://github.com/hapijs/qs
3
+ // Definitions by: Roman Korneev <https://github.com/RWander>
4
+ // Definitions: https://github.com/borisyankov/DefinitelyTyped
5
+
6
+ declare module QueryString {
7
+ interface IStringifyOptions {
8
+ delimiter ?: string ;
9
+ strictNullHandling ?: boolean ;
10
+ skipNulls ?: boolean ;
11
+ encode ?: boolean ;
12
+ filter ?: any ;
13
+ arrayFormat ?: any ;
14
+ indices ?: string ;
15
+ }
16
+
17
+ interface IParseOptions {
18
+ delimiter ?: string ;
19
+ depth ?: number ;
20
+ arrayLimit ?: number ;
21
+ parseArrays ?: boolean ;
22
+ allowDots ?: boolean ;
23
+ plainObjects ?: boolean ;
24
+ allowPrototypes ?: boolean ;
25
+ parameterLimit ?: number ;
26
+ strictNullHandling ?: boolean ;
27
+ }
28
+
29
+ function stringify ( obj : any , options ?: IStringifyOptions ) : string ;
30
+ function parse ( str : string , options ?: IParseOptions ) : any ;
31
+ }
32
+
33
+ declare module "qs" {
34
+ export = QueryString ;
35
+ }
You can’t perform that action at this time.
0 commit comments