winston/winston.d.ts file in this repo and had problems.winston/winston.d.ts.There is no property defaultLogger for winston. Instead, there is default (https://github.com/winstonjs/winston/blob/master/lib/winston.js#L157)
I believe defaultLogger was chosen because default is a keyword. However, this forces me to use winston['default'] to access the property. Also, trying to access winston.defaultLogger will not yield a defined value.
For context, here's a link to the current state of the 2.0 type declarations.
This file have to be rewritten to use an interface to declare Winston's exports, along with a variable and a namespace that has no value side:
declare var winston: Winston;
export = winston;
// Exported types go here.
declare namespace winston {
// Exported values go here.
interface Winston {
transports: Transports;
Transport: TransportStatic;
Logger: LoggerStatic;
Container: ContainerStatic;
loggers: ContainerInstance;
default: LoggerInstance;
// ...
}
export interface ExceptionProcessInfo {
pid: number;
uid?: number;
gid?: number;
cwd: string;
execPath: string;
version: string;
argv: string;
memoryUsage: NodeJS.MemoryUsage;
}
}
@westy92 @DanielRosenwasser Should this issue go ahead and be closed since #12551 was merged in?