Add bunyan-seq typings

This commit is contained in:
Ray Booysen 2019-02-07 14:39:11 +08:00
parent 0b417416fe
commit af9d8f5435
4 changed files with 47 additions and 0 deletions

View File

@ -0,0 +1,2 @@
import bunyanSeq = require("bunyan-seq");
bunyanSeq.createStream({name: 'LoggerComponent', serverUrl: 'http://seq.com'});

21
types/bunyan-seq/index.d.ts vendored Normal file
View File

@ -0,0 +1,21 @@
// Type definitions for bunyan-blackhole 0.2
// Project: https://github.com/datalust/bunyan-seq
// Definitions by: Ray Booysen <https://github.com/raybooysen>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.1
/// <reference types="node" />
import * as Logger from "bunyan";
export interface Configuration {
apiKey?: string;
batchSizeLimit?: number;
eventSizeLimit?: number;
level?: string;
maxBatchingTime?: number;
name?: string;
onError?: (e: Error) => void;
reemitErrorEvents?: boolean;
serverUrl?: string;
}
export function createStream(config: Configuration): Logger.Stream;

View File

@ -0,0 +1,23 @@
{
"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-seq-tests.ts"
]
}

View File

@ -0,0 +1 @@
{ "extends": "dtslint/dt.json" }