[Node] Updating stream interfaces and removing redundant interfaces.

We duplicated the EventEmitter and Stream interfaces in the "event" module, so I removed the redundant interface definitions.

I have updated the ReadableStream/WritableStream interfaces in accordance with the current documentation:
http://nodejs.org/api/stream.html

I added class definitions for Writable/Transform/Duplex/PassThrough in 'event'. These classes are described in the following Node documentation:
http://nodejs.org/api/stream.html#stream_api_for_stream_implementors

As a result of these changes, I needed to slightly alter other typings to refer to the new interface name. This was unavoidable; I had to rename the `EventEmitter` interface to `NodeEventEmitter` to avoid clashing with the `events.EventEmitter` class that implements `NodeEventEmitter`.
This commit is contained in:
John Vilk
2014-02-05 14:28:10 -05:00
parent 16dd1ab76f
commit 87ac1b3421
6 changed files with 156 additions and 113 deletions
+2 -2
View File
@@ -5,7 +5,7 @@
/// <reference path="../node/node.d.ts" />
interface BrowserifyObject extends EventEmitter {
interface BrowserifyObject extends NodeEventEmitter {
add(file: string): BrowserifyObject;
require(file: string, opts?: {
expose: string;
@@ -31,6 +31,6 @@ declare module "browserify" {
entries?: string[];
noParse?: string[];
}): BrowserifyObject;
export = browserify;
}