tests passed

This commit is contained in:
San Chen 2014-08-05 11:06:19 +08:00
parent 4ea6c8e685
commit a77c6b79f5
2 changed files with 4 additions and 2 deletions

View File

@ -10,7 +10,7 @@ function Usage() {
});
// using streams
var out; // = fs.createWriteStream('logo.png');
var out: any; // = fs.createWriteStream('logo.png');
needle.get('https://google.com/images/logo.png').pipe(out);
}
@ -31,7 +31,7 @@ function ResponsePipeline() {
var stream = needle.get('https://backend.server.com/everything.html', options);
stream.on('readable', function () {
var data;
var data: any;
while (data = this.read()) {
console.log(data.toString());
}

2
needle/needle.d.ts vendored
View File

@ -6,6 +6,8 @@
/// <reference path="../node/node.d.ts" />
declare module Needle {
interface ReadableStream extends NodeJS.ReadableStream {
}
interface Callback {
(error: Error, response: any, body: any): void;