diff --git a/split/split-tests.ts b/split/split-tests.ts index 71af1a0857..b9aef877f6 100644 --- a/split/split-tests.ts +++ b/split/split-tests.ts @@ -6,11 +6,11 @@ import split = require("split"); var testStream = new stream.Readable(); -testStream.pipe = function(dest) { +testStream.pipe = function(dest: stream.Writable) { dest.write("This is \r\n new \r\n line"); return dest; }; -testStream.pipe(split(/(\r?\n)/, null, {maxLength: 20})).on("data", function(line) { - console.log("Line: " + line + "\r\n"); +testStream.pipe(split(/(\r?\n)/, null, {maxLength: 20})).on("data", function(line: Buffer) { + console.log("Line: " + line.toString('ascii') + "\r\n"); });