From c5f2ca04afffdf95d3366048741f65f4914a3d55 Mon Sep 17 00:00:00 2001 From: Daniel Herman Date: Mon, 12 Feb 2018 13:14:59 -0500 Subject: [PATCH] Support the single argument options only config API `Raven.config` supports calling it with only the configuration object if you'd like the DSN to be pulled from environment variables https://github.com/getsentry/raven-node/blob/6ce861f9f3fabdeba37013ff1d7dedc3eb6f7a80/lib/client.js#L44-L47 --- types/raven/index.d.ts | 1 + types/raven/raven-tests.ts | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/types/raven/index.d.ts b/types/raven/index.d.ts index eec1b00f2c..21aee49169 100644 --- a/types/raven/index.d.ts +++ b/types/raven/index.d.ts @@ -10,6 +10,7 @@ import { IncomingMessage, ServerResponse } from 'http'; import { EventEmitter } from 'events'; export const version: string; +export function config(options?: ConstructorOptions): Client; export function config(dsn?: string | false, options?: ConstructorOptions): Client; export function wrap(func: () => T): () => T; export function wrap(options: any, func: () => T): () => T; diff --git a/types/raven/raven-tests.ts b/types/raven/raven-tests.ts index 4d96e7eafa..71f9b54038 100644 --- a/types/raven/raven-tests.ts +++ b/types/raven/raven-tests.ts @@ -9,6 +9,10 @@ Raven.config(dsn, { autoBreadcrumbs: false, }); console.log(Raven.version); + +Raven.config({ + release: 'foobar' +}); Raven.config(dsn).install({ captureUnhandledRejections: true }); client.setContext({}); client.on('logged', () => { });