-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.d.ts
More file actions
24 lines (21 loc) · 758 Bytes
/
index.d.ts
File metadata and controls
24 lines (21 loc) · 758 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
export as namespace jsminiQuerystring;
interface parseOption {
sep?: string;
eq?: string;
ignoreQueryPrefix?: boolean;
decode?: (x: string, isKey?: boolean) => string;
filter?: (v: string, k?: string) => boolean;
convert?: (v: string, k?: string) => any;
reduce?: (prev: object, v: string, k?: string) => object;
}
interface stringifyOption {
sep?: string;
eq?: string;
addQueryPrefix?: boolean;
encode?: (x: string, isKey?: boolean) => string;
filter?: (v: any, k?: string) => boolean;
convert?: (v: any, k?: string) => any;
reduce?: (prev: object[], v: any, k?: string) => object[];
}
export function parse(str: string, option?: parseOption): object;
export function stringify(obj: object, option?: stringifyOption): string;