bunyan-bugsnag: Provides its own types (#39644)

This commit is contained in:
Alexander T
2019-10-28 20:27:54 -07:00
committed by Jesse Trinity
parent 544900320e
commit 4728586434
5 changed files with 6 additions and 70 deletions
+6
View File
@@ -306,6 +306,12 @@
"sourceRepoURL": "https://github.com/sindresorhus/builtin-modules",
"asOfVersion": "3.1.0"
},
{
"libraryName": "bunyan-bugsnag",
"typingsPackageName": "bunyan-bugsnag",
"sourceRepoURL": "https://github.com/marnusw/bunyan-bugsnag",
"asOfVersion": "3.0.0"
},
{
"libraryName": "CacheFactory",
"typingsPackageName": "cachefactory",
@@ -1,27 +0,0 @@
import bunyanBugsnag = require('bunyan-bugsnag');
import * as bunyan from 'bunyan';
const stream1 = bunyanBugsnag();
const stream2 = bunyanBugsnag({
systemInfo: ['name', 'hostname', 'pid', 'req_id', 'level', 'time', 'v'],
warningLevel: 'warn',
errorLevel: 'error',
});
const options: bunyanBugsnag.Options = {
systemInfo: ['name', 'hostname', 'pid', 'req_id', 'level', 'time', 'v'],
warningLevel: 30,
errorLevel: 20
};
const stream3 = bunyanBugsnag(options);
const logger = bunyan.createLogger({
name: 'appName',
streams: [{
type: 'raw',
level: 'warn',
stream: stream3
}]
});
-19
View File
@@ -1,19 +0,0 @@
// Type definitions for bunyan-bugsnag 1.0
// Project: https://github.com/marnusw/bunyan-bugsnag
// Definitions by: Pasi Eronen <https://github.com/pasieronen>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.1
import * as Logger from 'bunyan';
declare namespace bugsnagLogStream {
interface Options {
systemInfo?: string[];
warningLevel?: Logger.LogLevel;
errorLevel?: Logger.LogLevel;
}
}
declare function bugsnagLogStream(options?: bugsnagLogStream.Options): NodeJS.WritableStream;
export = bugsnagLogStream;
-23
View File
@@ -1,23 +0,0 @@
{
"compilerOptions": {
"module": "commonjs",
"lib": [
"es6"
],
"noImplicitAny": true,
"noImplicitThis": true,
"strictNullChecks": true,
"strictFunctionTypes": true,
"baseUrl": "../",
"typeRoots": [
"../"
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
},
"files": [
"index.d.ts",
"bunyan-bugsnag-tests.ts"
]
}
-1
View File
@@ -1 +0,0 @@
{ "extends": "dtslint/dt.json" }