mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-12 04:50:18 +00:00
Add typings for @newrelic/winston-enricher (#41134)
* Add typings for @newrelic/winston-enricher * Fix typo * fixes * more * :partyparrot: * simplify dependencies
This commit is contained in:
committed by
Andrew Branch
parent
3c9d910f4d
commit
d013dfe912
+11
@@ -0,0 +1,11 @@
|
||||
// Type definitions for @newrelic/winston-enricher 0.1
|
||||
// Project: https://github.com/newrelic/newrelic-winston-logenricher-node
|
||||
// Definitions by: wrumsby <https://github.com/wrumsby>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.2
|
||||
|
||||
import { Format } from 'logform';
|
||||
|
||||
declare function newrelicFormatter(): Format;
|
||||
|
||||
export = newrelicFormatter;
|
||||
@@ -0,0 +1,13 @@
|
||||
import newrelicFormatter = require('@newrelic/winston-enricher');
|
||||
import winston = require('winston');
|
||||
|
||||
const logger = winston.createLogger({
|
||||
level: 'info',
|
||||
transports: new winston.transports.Console(),
|
||||
format: winston.format.combine(
|
||||
winston.format.label({label: 'test'}),
|
||||
newrelicFormatter()
|
||||
)
|
||||
});
|
||||
|
||||
logger.debug('test');
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"winston": "^3.0.0"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": [
|
||||
"es6"
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictFunctionTypes": true,
|
||||
"strictNullChecks": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true,
|
||||
"paths": {
|
||||
"@newrelic/winston-enricher": [
|
||||
"newrelic__winston-enricher"
|
||||
]
|
||||
}
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"newrelic__winston-enricher-tests.ts"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
Reference in New Issue
Block a user