forked from zemirco/json2csv
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.d.ts
More file actions
33 lines (29 loc) · 724 Bytes
/
index.d.ts
File metadata and controls
33 lines (29 loc) · 724 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
25
26
27
28
29
30
31
32
33
declare namespace json2csv {
interface IField {
label?: string;
value: string;
default?: string;
}
interface IOptions {
data: any[];
fields?: (string | IField)[];
filedNames?: string[];
del?: string;
defaultValue?: string;
quotes?: string;
doubleQuotes?: string;
hasCSVColumnTitle?: boolean;
eol?: string;
newLine?: string;
flatten?: boolean;
unwindPath?: string;
excelStrings?: boolean;
includeEmptyRows?: boolean;
}
interface ICallback {
(error: Error, csv: string): void;
}
export function json2csv(options: IOptions, callback: ICallback): void;
export function json2csv(options: IOptions): string;
}
export = json2csv.json2csv;