[@types/csv2json] wrong type, returns is a Pumpify (#37488)

This commit is contained in:
EduardoRFS
2019-08-13 19:35:43 -03:00
committed by Pranav Senthilnathan
parent 6a9b457fb1
commit 0f3e92daf2
2 changed files with 8 additions and 7 deletions

View File

@@ -1,8 +1,11 @@
import Pumpify = require("pumpify");
import csv2json = require("csv2json");
import fs = require("fs");
fs.createReadStream('data.csv')
.pipe(csv2json({
separator: ';'
}))
.pipe(
// $ExpectType Pumpify
csv2json({
separator: ';'
}))
.pipe(fs.createWriteStream('data.json'));

View File

@@ -3,9 +3,7 @@
// Definitions by: Piotr Roszatycki <https://github.com/dex4er>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/// <reference types="node" />
import { Writable } from "stream";
import Pumpify = require("pumpify");
declare namespace csv2json {
interface Options {
@@ -14,6 +12,6 @@ declare namespace csv2json {
}
}
declare function csv2json(options?: csv2json.Options): Writable;
declare function csv2json(options?: csv2json.Options): Pumpify;
export = csv2json;