mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-09-11 11:50:54 +08:00
imported 25 definitions from typescript-node-definitions
first batch: the easy pickings - as per https://github.com/borisyankov/DefinitelyTyped/issues/115 - added DT headers (scraped creators from git history) - added tests - some modifications - added CONTRIBUTORS.md for the substantial defs (>50 LOC)
This commit is contained in:
@@ -0,0 +1,40 @@
|
||||
/// <reference path="winston.d.ts" />
|
||||
|
||||
import winston = require('winston');
|
||||
|
||||
var str: string;
|
||||
var bool: boolean;
|
||||
var metadata: any;
|
||||
var options: any;
|
||||
var value: any;
|
||||
var transport: winston.Transport;
|
||||
|
||||
transport = winston.transports.File;
|
||||
transport = winston.transports.Console;
|
||||
transport = winston.transports.Loggly;
|
||||
|
||||
winston.log(str, str);
|
||||
winston.log(str, str, metadata);
|
||||
winston.debug(str);
|
||||
winston.debug(str, metadata);
|
||||
winston.info(str);
|
||||
winston.info(str, metadata);
|
||||
winston.warn(str);
|
||||
winston.warn(str, metadata);
|
||||
winston.error(str);
|
||||
winston.error(str, metadata);
|
||||
|
||||
winston.add(transport, options);
|
||||
winston.remove(transport);
|
||||
|
||||
winston.profile(str);
|
||||
|
||||
winston.query(options, (err: any, results: any) => {
|
||||
|
||||
});
|
||||
|
||||
value = winston.stream(options);
|
||||
|
||||
winston.handleExceptions(transport);
|
||||
winston.exitOnError = bool;
|
||||
|
||||
Vendored
+39
@@ -0,0 +1,39 @@
|
||||
// Type definitions for winston
|
||||
// Project: https://github.com/flatiron/winston
|
||||
// Definitions by: bonnici <https://github.com/bonnici>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
// Imported from: https://github.com/soywiz/typescript-node-definitions/winston.d.ts
|
||||
|
||||
declare module "winston" {
|
||||
export function log(level: string, message: string, metadata?: any): void;
|
||||
export function debug(message: string, metadata?: any): void;
|
||||
export function info(message: string, metadata?: any): void;
|
||||
export function warn(message: string, metadata?: any): void;
|
||||
export function error(message: string, metadata?: any): void;
|
||||
|
||||
export function add(transport: Transport, options: any): void;
|
||||
export function remove(transport: Transport): void;
|
||||
|
||||
export function profile(name: string): void;
|
||||
|
||||
export function query(options: any, done: (err: any, results: any) => void): void;
|
||||
|
||||
export function stream(options: any): any;
|
||||
|
||||
export function handleExceptions(transport: Transport): void;
|
||||
|
||||
export class Logger {
|
||||
|
||||
}
|
||||
|
||||
export interface Transport {
|
||||
}
|
||||
export interface Transports {
|
||||
File: Transport;
|
||||
Console: Transport;
|
||||
Loggly: Transport;
|
||||
}
|
||||
export var transports: Transports;
|
||||
export var exitOnError: boolean;
|
||||
}
|
||||
Reference in New Issue
Block a user