pipe() not just fs.WriteStream and express.Response

I believe (in keeping with stream.Transform) that it should be possible to pipe to any Writable... no need to depend on express?
This commit is contained in:
Shaun Cutts
2017-06-28 02:08:51 -04:00
committed by GitHub
parent c126a9ec44
commit ee116c70db

View File

@@ -15,9 +15,7 @@
/// <reference types="node" />
import * as fs from 'fs';
import * as stream from 'stream';
import * as express from 'express';
import * as glob from 'glob';
declare function archiver(format: archiver.Format, options?: archiver.ArchiverOptions): archiver.Archiver;
@@ -46,7 +44,7 @@ declare namespace archiver {
glob(pattern: string, options?: glob.IOptions, data?: EntryData): this;
finalize(): this;
pipe(stream: fs.WriteStream | express.Response): void;
pipe(stream: stream.Writable): void;
setFormat(format: string): this;
setModule(module: Function): this;