add RavenPlugin interface

This commit is contained in:
Wilgert Velinga
2016-02-10 17:04:41 +01:00
parent 45967547e8
commit a5790c7a0d

View File

@@ -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;
}