From b164150c4016cabd95376d2bfb6360bc158485f7 Mon Sep 17 00:00:00 2001 From: Marcin Porebski Date: Thu, 26 Feb 2015 10:46:05 +0100 Subject: [PATCH] split def. fix --- split/split-tests.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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"); });