Merge pull request #16410 from stevehipwell/bunyan-winston-adapter

Added types for bunyan-winston-adapter
This commit is contained in:
Arthur Ozga
2017-05-22 10:12:58 -07:00
committed by GitHub
4 changed files with 41 additions and 0 deletions
@@ -0,0 +1,9 @@
import { createAdapter } from "bunyan-winston-adapter";
import { Logger, LoggerInstance, transports } from "winston";
const logger = new Logger();
const mapping = {
trace: 'silly'
};
const adapterA = createAdapter(logger);
const adapterB = createAdapter(logger, mapping);
+9
View File
@@ -0,0 +1,9 @@
// Type definitions for bunyan-winston-adapter 0.2
// Project: https://github.com/gluwer/bunyan-winston-adapter
// Definitions by: Steve Hipwell <https://github.com/stevehipwell>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
import * as bunyan from "bunyan";
import { LoggerInstance } from "winston";
export function createAdapter(logger: LoggerInstance, mapping?: any): bunyan;
@@ -0,0 +1,22 @@
{
"compilerOptions": {
"module": "commonjs",
"lib": [
"es6"
],
"noImplicitAny": true,
"noImplicitThis": true,
"strictNullChecks": true,
"baseUrl": "../",
"typeRoots": [
"../"
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
},
"files": [
"index.d.ts",
"bunyan-winston-adapter-tests.ts"
]
}
+1
View File
@@ -0,0 +1 @@
{ "extends": "dtslint/dt.json" }