diff --git a/types/csv2json/csv2json-tests.ts b/types/csv2json/csv2json-tests.ts index b211fd9aee..6cbe4f695d 100644 --- a/types/csv2json/csv2json-tests.ts +++ b/types/csv2json/csv2json-tests.ts @@ -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')); diff --git a/types/csv2json/index.d.ts b/types/csv2json/index.d.ts index 6906d3e925..6d81f020b6 100644 --- a/types/csv2json/index.d.ts +++ b/types/csv2json/index.d.ts @@ -3,9 +3,7 @@ // Definitions by: Piotr Roszatycki // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -/// - -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;