mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-07-01 15:50:13 +00:00
[@types/csv2json] wrong type, returns is a Pumpify (#37488)
This commit is contained in:
committed by
Pranav Senthilnathan
parent
6a9b457fb1
commit
0f3e92daf2
@@ -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'));
|
||||
|
||||
6
types/csv2json/index.d.ts
vendored
6
types/csv2json/index.d.ts
vendored
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user