From 45967547e8f8eaf788f67d3718a32dd5542ccb45 Mon Sep 17 00:00:00 2001 From: Wilgert Velinga Date: Wed, 10 Feb 2016 12:55:18 +0100 Subject: [PATCH 1/2] add addPlugins() and Plugins to RavenStatic --- ravenjs/ravenjs.d.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/ravenjs/ravenjs.d.ts b/ravenjs/ravenjs.d.ts index 629140d8b..37cf036fd 100644 --- a/ravenjs/ravenjs.d.ts +++ b/ravenjs/ravenjs.d.ts @@ -57,6 +57,8 @@ interface RavenStatic { /** Raven.js version. */ VERSION: string; + + Plugins: any; /* * Allow Raven to be configured as soon as it is loaded @@ -92,6 +94,13 @@ interface RavenStatic { * @return {Raven} */ install(): RavenStatic; + + /* + * Adds a plugin to Raven + * + * @return {Raven} + */ + addPlugin(plugin: any, ...pluginArgs: any[]): RavenStatic; /* * Wrap code within a context so Raven can capture errors From a5790c7a0d20270cefb4550f5b2b8c466fd663a4 Mon Sep 17 00:00:00 2001 From: Wilgert Velinga Date: Wed, 10 Feb 2016 17:04:41 +0100 Subject: [PATCH 2/2] add RavenPlugin interface --- ravenjs/ravenjs.d.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/ravenjs/ravenjs.d.ts b/ravenjs/ravenjs.d.ts index 37cf036fd..03d6a096c 100644 --- a/ravenjs/ravenjs.d.ts +++ b/ravenjs/ravenjs.d.ts @@ -58,7 +58,7 @@ interface RavenStatic { /** Raven.js version. */ VERSION: string; - Plugins: any; + Plugins: RavenPlugin[]; /* * Allow Raven to be configured as soon as it is loaded @@ -100,7 +100,7 @@ interface RavenStatic { * * @return {Raven} */ - addPlugin(plugin: any, ...pluginArgs: any[]): RavenStatic; + addPlugin(plugin: RavenPlugin, ...pluginArgs: any[]): RavenStatic; /* * Wrap code within a context so Raven can capture errors @@ -188,3 +188,7 @@ interface RavenTransportOptions { onSuccess: () => void; onFailure: () => void; } + +interface RavenPlugin { + (raven: RavenStatic, ...args: any[]): RavenStatic; +}