Skip to content

Commit

Permalink
node: move Node* to NodeJS module
Browse files Browse the repository at this point in the history
  • Loading branch information
loyd authored and Bartvds committed Apr 28, 2014
1 parent c52e7bd commit 25a3c76
Show file tree
Hide file tree
Showing 8 changed files with 212 additions and 203 deletions.
4 changes: 2 additions & 2 deletions browserify/browserify.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

/// <reference path="../node/node.d.ts" />

interface BrowserifyObject extends NodeEventEmitter {
interface BrowserifyObject extends NodeJS.EventEmitter {
add(file: string): BrowserifyObject;
require(file: string, opts?: {
expose: string;
Expand All @@ -16,7 +16,7 @@ interface BrowserifyObject extends NodeEventEmitter {
debug?: boolean;
standalone?: string;
insertGlobalVars?: any;
}, cb?: (err: any, src: any) => void): NodeReadableStream;
}, cb?: (err: any, src: any) => void): NodeJS.ReadableStream;

external(file: string): BrowserifyObject;
ignore(file: string): BrowserifyObject;
Expand Down
6 changes: 3 additions & 3 deletions highland/highland-tests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ var strArr: string[];
var numArr: string[];
var funcArr: Function[];

var readable: NodeReadableStream;
var writable: NodeWritableStream;
var emitter: NodeEventEmitter;
var readable: NodeJS.ReadableStream;
var writable: NodeJS.WritableStream;
var emitter: NodeJS.EventEmitter;

// - - - - - - - - - - - - - - - - -

Expand Down
10 changes: 5 additions & 5 deletions highland/highland.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ interface HighlandStatic {
<R>(xs: (push: (err: Error, x?: R) => void, next: () => void) => void): Highland.Stream<R>;

<R>(xs: Highland.Stream<R>): Highland.Stream<R>;
<R>(xs: NodeReadableStream): Highland.Stream<R>;
<R>(xs: NodeEventEmitter): Highland.Stream<R>;
<R>(xs: NodeJS.ReadableStream): Highland.Stream<R>;
<R>(xs: NodeJS.EventEmitter): Highland.Stream<R>;

// moar (promise for everything?)
<R>(xs: Highland.Thenable<Highland.Stream<R>>): Highland.Stream<R>;
Expand Down Expand Up @@ -365,7 +365,7 @@ declare module Highland {
/**
* Actual Stream constructor wrapped the the main exported function
*/
interface Stream<R> extends NodeEventEmitter {
interface Stream<R> extends NodeJS.EventEmitter {

/**
* Pauses the stream. All Highland Streams start in the paused state.
Expand Down Expand Up @@ -419,8 +419,8 @@ declare module Highland {
* @api public
*/
pipe<U>(dest: Stream<U>): Stream<U>;
pipe<U>(dest: NodeReadWriteStream): Stream<U>;
pipe(dest: NodeWritableStream): void;
pipe<U>(dest: NodeJS.ReadWriteStream): Stream<U>;
pipe(dest: NodeJS.WritableStream): void;

/**
* Destroys a stream by unlinking it from any consumers and sources. This will
Expand Down
24 changes: 12 additions & 12 deletions jake/jake.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ declare module jake{
* @event stderr When the stderr for the child-process recieves data. This streams the stderr data. Passes one arg, the chunk of data.
* @event error When a shell-command
*/
export interface Exec extends NodeEventEmitter {
export interface Exec extends NodeJS.EventEmitter {
append(cmd:string): void;
run(): void;
}
Expand Down Expand Up @@ -187,7 +187,7 @@ declare module jake{
*
* @event complete
*/
export class Task implements NodeEventEmitter {
export class Task implements NodeJS.EventEmitter {
/**
* @name name The name of the Task
* @param prereqs Prerequisites to be run before this task
Expand All @@ -206,11 +206,11 @@ declare module jake{
*/
reenable(): void;

addListener(event: string, listener: Function): NodeEventEmitter;
on(event: string, listener: Function): NodeEventEmitter;
once(event: string, listener: Function): NodeEventEmitter;
removeListener(event: string, listener: Function): NodeEventEmitter;
removeAllListeners(event?: string): NodeEventEmitter;
addListener(event: string, listener: Function): NodeJS.EventEmitter;
on(event: string, listener: Function): NodeJS.EventEmitter;
once(event: string, listener: Function): NodeJS.EventEmitter;
removeListener(event: string, listener: Function): NodeJS.EventEmitter;
removeAllListeners(event?: string): NodeJS.EventEmitter;
setMaxListeners(n: number): void;
listeners(event: string): Function[];
emit(event: string, ...args: any[]): boolean;
Expand Down Expand Up @@ -381,11 +381,11 @@ declare module jake{
constructor(name:string, definition?:()=>void);
}

export function addListener(event: string, listener: Function): NodeEventEmitter;
export function on(event: string, listener: Function): NodeEventEmitter;
export function once(event: string, listener: Function): NodeEventEmitter;
export function removeListener(event: string, listener: Function): NodeEventEmitter;
export function removeAllListener(event: string): NodeEventEmitter;
export function addListener(event: string, listener: Function): NodeJS.EventEmitter;
export function on(event: string, listener: Function): NodeJS.EventEmitter;
export function once(event: string, listener: Function): NodeJS.EventEmitter;
export function removeListener(event: string, listener: Function): NodeJS.EventEmitter;
export function removeAllListener(event: string): NodeJS.EventEmitter;
export function setMaxListeners(n: number): void;
export function listeners(event: string): Function[];
export function emit(event: string, ...args: any[]): boolean;
Expand Down
Loading

0 comments on commit 25a3c76

Please sign in to comment.