mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-05 15:27:05 +00:00
Fixing the type definition for UnparseConfig to allow the quotes property to be undefined, a boolean, or an array of booleans per the documentation: https://www.papaparse.com/docs#json-to-csv (#32217)
This commit is contained in:
Vendored
+6
-6
@@ -117,12 +117,12 @@ export interface ParseConfig {
|
||||
}
|
||||
|
||||
export interface UnparseConfig {
|
||||
quotes?: boolean; // default: false
|
||||
quoteChar?: string; // default: '"'
|
||||
escapeChar?: string; // default: '"'
|
||||
delimiter?: string; // default: ","
|
||||
header?: boolean; // default: true
|
||||
newline?: string; // default: "\r\n"
|
||||
quotes?: boolean | boolean[]; // default: false
|
||||
quoteChar?: string; // default: '"'
|
||||
escapeChar?: string; // default: '"'
|
||||
delimiter?: string; // default: ","
|
||||
header?: boolean; // default: true
|
||||
newline?: string; // default: "\r\n"
|
||||
}
|
||||
|
||||
export interface UnparseObject {
|
||||
|
||||
@@ -66,6 +66,7 @@ Papa.unparse({
|
||||
});
|
||||
|
||||
Papa.unparse([{ a: 1, b: 1, c: 1 }], { quotes: false });
|
||||
Papa.unparse([{ a: 1, b: 1, c: 1 }], { quotes: [false, true, true] });
|
||||
Papa.unparse([[1, 2, 3], [4, 5, 6]], { delimiter: "," });
|
||||
Papa.unparse({
|
||||
fields: ["3"],
|
||||
|
||||
Reference in New Issue
Block a user