From f8127f02237ae69960a27775a2b18f2fd7ff03ef Mon Sep 17 00:00:00 2001 From: CodeAnimal Date: Thu, 25 Sep 2014 01:13:47 +0100 Subject: [PATCH] Remove legacy node references The legacy node references have been removed to stop the global namespace being littered with old node definitions. --- winston/winston.d.ts | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) diff --git a/winston/winston.d.ts b/winston/winston.d.ts index c0e5a7a42..4cf5370ca 100644 --- a/winston/winston.d.ts +++ b/winston/winston.d.ts @@ -7,17 +7,6 @@ /// - -//////// Here for backwards compatibility to older Node definitions //////// -declare module NodeJS { - interface EventEmitter { } - interface ReadWriteStream { } -} - -interface NodeEventEmitter extends NodeJS.EventEmitter { } -interface ReadableStream extends NodeJS.ReadableStream { } -//////////////////////////////////////////////////////////////////////////// - declare module "winston" { export var transports: Transports; @@ -47,7 +36,7 @@ declare module "winston" { export function query(options: QueryOptions, callback?: (err: Error, results: any) => void): any; export function query(callback: (err: Error, results: any) => void): any; - export function stream(options?: any): ReadableStream; + export function stream(options?: any): NodeJS.ReadableStream; export function handleExceptions(...transports: TransportInstance[]): void; export function unhandleExceptions(...transports: TransportInstance[]): void; export function add(transport: TransportInstance, options?: TransportOptions, created?: boolean): LoggerInstance; @@ -63,7 +52,7 @@ declare module "winston" { new (options?: LoggerOptions); } - export interface LoggerInstance extends NodeEventEmitter { + export interface LoggerInstance extends NodeJS.EventEmitter { extend(target: any): LoggerInstance; log(level: string, msg: string, meta: any, callback?: (err: Error, level: string, msg: string, meta: any) => void): LoggerInstance; @@ -83,7 +72,7 @@ declare module "winston" { query(options: QueryOptions, callback?: (err: Error, results: any) => void): any; query(callback: (err: Error, results: any) => void): any; - stream(options?: any): ReadableStream; + stream(options?: any): NodeJS.ReadableStream; close(): void; handleExceptions(...transports: TransportInstance[]): void; unhandleExceptions(...transports: TransportInstance[]): void; @@ -114,7 +103,7 @@ declare module "winston" { new (options?: TransportOptions): TransportInstance; } - export interface TransportInstance extends TransportStatic, NodeEventEmitter { + export interface TransportInstance extends TransportStatic, NodeJS.EventEmitter { formatQuery(query: any): any; normalizeQuery(options: QueryOptions): QueryOptions; formatResults(results: any, options: any): any;