mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-05 07:17:04 +00:00
Merge pull request #16410 from stevehipwell/bunyan-winston-adapter
Added types for bunyan-winston-adapter
This commit is contained in:
@@ -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
@@ -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"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
Reference in New Issue
Block a user