mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-04 14:57:10 +00:00
bunyan-bugsnag: Provides its own types (#39644)
This commit is contained in:
committed by
Jesse Trinity
parent
544900320e
commit
4728586434
@@ -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
|
||||
}]
|
||||
});
|
||||
Vendored
-19
@@ -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;
|
||||
@@ -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 +0,0 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
Reference in New Issue
Block a user