diff --git a/types/bunyan-seq/bunyan-seq-tests.ts b/types/bunyan-seq/bunyan-seq-tests.ts new file mode 100644 index 0000000000..beeeb9d8ee --- /dev/null +++ b/types/bunyan-seq/bunyan-seq-tests.ts @@ -0,0 +1,2 @@ +import bunyanSeq = require("bunyan-seq"); +bunyanSeq.createStream({name: 'LoggerComponent', serverUrl: 'http://seq.com'}); diff --git a/types/bunyan-seq/index.d.ts b/types/bunyan-seq/index.d.ts new file mode 100644 index 0000000000..2520c93339 --- /dev/null +++ b/types/bunyan-seq/index.d.ts @@ -0,0 +1,21 @@ +// Type definitions for bunyan-blackhole 0.2 +// Project: https://github.com/datalust/bunyan-seq +// Definitions by: Ray Booysen +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 + +/// +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; diff --git a/types/bunyan-seq/tsconfig.json b/types/bunyan-seq/tsconfig.json new file mode 100644 index 0000000000..bd77368148 --- /dev/null +++ b/types/bunyan-seq/tsconfig.json @@ -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" + ] +} diff --git a/types/bunyan-seq/tslint.json b/types/bunyan-seq/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/bunyan-seq/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" }