DefinitelyTyped/types/bristol-sentry/index.d.ts
Elliott Campbell f346ea3bae Add [bristol-sentry] type declarations (#38043)
* [bristol-sentry] Added type declarations

* [bristol-sentry] changed `any` to `object` for specificity

* [bristol-sentry] Updated `definitions by` github link
2019-09-05 17:25:22 -07:00

26 lines
717 B
TypeScript

// Type definitions for bristol-sentry 0.0
// Project: https://github.com/jeffijoe/bristol-sentry#readme
// Definitions by: Elliott Campbell <https://github.com/ElliottCampbellJHA>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.2
import * as raven from 'raven';
interface FormattedLog {
message: string;
extra: ReadonlyArray<object>;
error?: Error;
}
interface SentryConfig {
client?: {} | raven.Client;
}
export = makeSentryTarget;
declare function makeSentryTarget(config: SentryConfig): () => void;
declare namespace makeSentryTarget {
function formatter(opts: object, severity: string, date: Date, elems: ReadonlyArray<any>): FormattedLog;
}