mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-09-07 16:30:12 +08:00
tests passed
This commit is contained in:
@@ -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());
|
||||
}
|
||||
|
||||
Vendored
+2
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user