mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
25 lines
492 B
TypeScript
25 lines
492 B
TypeScript
/// <reference types="node" />
|
|
|
|
import stringify = require("csv-stringify");
|
|
|
|
let stream: stringify.Stringifier;
|
|
|
|
stringify([["1", "2", "3"], ["4", "5", "6"]], (error: Error, output: string): void => {
|
|
// nothing
|
|
});
|
|
|
|
stringify([["1", "2", "3"], ["4", "5", "6"]], {
|
|
delimiter: ","
|
|
}, (error: Error, output: string): void => {
|
|
// nothing
|
|
});
|
|
|
|
|
|
stream = stringify({ delimiter: "," });
|
|
|
|
stream.write(["1", "2", "3"]);
|
|
|
|
let transform: NodeJS.ReadWriteStream = stream;
|
|
|
|
stream = stringify();
|