File tree 1 file changed +27
-5
lines changed
1 file changed +27
-5
lines changed Original file line number Diff line number Diff line change 1
- declare module 'json2csv' {
2
- interface CSVCallback {
3
- ( error : Error , csv : string ) : void ;
1
+ declare namespace json2csv {
2
+ interface IField {
3
+ label ?: string ;
4
+ value : string ;
5
+ default ?: string ;
6
+ }
7
+
8
+ interface IOptions {
9
+ data : any [ ] ;
10
+ fields ?: ( string | IField ) [ ] ;
11
+ filedNames ?: string [ ] ;
12
+ del ?: string ;
13
+ defaultValue ?: string ;
14
+ quotes ?: string ;
15
+ doubleQuotes ?: string ;
16
+ hasCSVColumnTitle ?: boolean ;
17
+ eol ?: string ;
18
+ newLine ?: string ;
19
+ flatten ?: boolean ;
20
+ excelStrings ?: boolean ;
4
21
}
5
22
6
- function json2csv ( options : any , callback : CSVCallback ) : string ;
7
- export = json2csv ;
23
+ interface ICallback {
24
+ ( error : Error , csv : string ) : void ;
25
+ }
26
+
27
+ export function json2csv ( options : IOptions , callback : ICallback ) : string ;
8
28
}
29
+
30
+ export = json2csv . json2csv ;
You can’t perform that action at this time.
0 commit comments