@@ -122,129 +122,127 @@ declare namespace Raven {
122122
123123 Plugins : { [ id : string ] : RavenPlugin } ;
124124
125- /*
126- * Allow Raven to be configured as soon as it is loaded
127- * It uses a global RavenConfig = {dsn: '...', config: {}}
128- *
129- * @return undefined
130- */
125+ /**
126+ * Allow Raven to be configured as soon as it is loaded
127+ * It uses a global RavenConfig = {dsn: '...', config: {}}
128+ *
129+ * @return undefined
130+ */
131131 afterLoad ( ) : void ;
132132
133- /*
134- * Allow multiple versions of Raven to be installed.
135- * Strip Raven from the global context and returns the instance.
136- *
137- * @return {Raven }
138- */
133+ /**
134+ * Allow multiple versions of Raven to be installed.
135+ * Strip Raven from the global context and returns the instance.
136+ *
137+ * @return {Raven }
138+ */
139139 noConflict ( ) : RavenStatic ;
140140
141- /*
142- * Configure Raven with a DSN and extra options
143- *
144- * @param {string } dsn The public Sentry DSN
145- * @param {object } options Optional set of global options [optional]
146- * @return {Raven }
147- */
141+ /**
142+ * Configure Raven with a DSN and extra options
143+ *
144+ * @param {string } dsn The public Sentry DSN
145+ * @param {object } options Optional set of global options [optional]
146+ * @return {Raven }
147+ */
148148 config ( dsn : string , options ?: RavenOptions ) : RavenStatic ;
149149
150- /*
151- * Installs a global window.onerror error handler
152- * to capture and report uncaught exceptions.
153- * At this point, install() is required to be called due
154- * to the way TraceKit is set up.
155- *
156- * @return {Raven }
157- */
150+ /**
151+ * Installs a global window.onerror error handler
152+ * to capture and report uncaught exceptions.
153+ * At this point, install() is required to be called due
154+ * to the way TraceKit is set up.
155+ *
156+ * @return {Raven }
157+ */
158158 install ( ) : RavenStatic ;
159159
160- /*
161- * Adds a plugin to Raven
162- *
163- * @return {Raven }
164- */
160+ /**
161+ * Adds a plugin to Raven
162+ *
163+ * @return {Raven }
164+ */
165165 addPlugin ( plugin : RavenPlugin , ...pluginArgs : any [ ] ) : RavenStatic ;
166166
167- /*
168- * Wrap code within a context so Raven can capture errors
169- * reliably across domains that is executed immediately.
170- *
171- * @param {object } options A specific set of options for this context [optional]
172- * @param {function } func The callback to be immediately executed within the context
173- * @param {array } args An array of arguments to be called with the callback [optional]
174- */
167+ /**
168+ * Wrap code within a context so Raven can capture errors
169+ * reliably across domains that is executed immediately.
170+ *
171+ * @param {object } options A specific set of options for this context [optional]
172+ * @param {function } func The callback to be immediately executed within the context
173+ * @param {array } args An array of arguments to be called with the callback [optional]
174+ */
175175 context ( func : Function , ...args : any [ ] ) : void ;
176176 context ( options : RavenOptions , func : Function , ...args : any [ ] ) : void ;
177177
178- /*
179- * Wrap code within a context and returns back a new function to be executed
180- *
181- * @param {object } options A specific set of options for this context [optional]
182- * @param {function } func The function to be wrapped in a new context
183- * @return {function } The newly wrapped functions with a context
184- */
178+ /**
179+ * Wrap code within a context and returns back a new function to be executed
180+ *
181+ * @param {object } options A specific set of options for this context [optional]
182+ * @param {function } func The function to be wrapped in a new context
183+ * @return {function } The newly wrapped functions with a context
184+ */
185185 wrap ( func : Function ) : Function ;
186186 wrap ( options : RavenOptions , func : Function ) : Function ;
187187 wrap < T extends Function > ( func : T ) : T ;
188188 wrap < T extends Function > ( options : RavenOptions , func : T ) : T ;
189189
190- /*
191- * Uninstalls the global error handler.
192- *
193- * @return {Raven }
194- */
190+ /**
191+ * Uninstalls the global error handler.
192+ *
193+ * @return {Raven }
194+ */
195195 uninstall ( ) : RavenStatic ;
196196
197- /*
198- * Manually capture an exception and send it over to Sentry
199- *
200- * @param {error|ErrorEvent|string } ex An exception to be logged
201- * @param {object } options A specific set of options for this error [optional]
202- * @return {Raven }
203- */
197+ /**
198+ * Manually capture an exception and send it over to Sentry
199+ *
200+ * @param {error|ErrorEvent|string } ex An exception to be logged
201+ * @param {object } options A specific set of options for this error [optional]
202+ * @return {Raven }
203+ */
204204 captureException (
205205 ex : Error | ErrorEvent | string ,
206206 options ?: RavenOptions
207207 ) : RavenStatic ;
208208
209- /*
210- * Manually send a message to Sentry
211- *
212- * @param {string } msg A plain message to be captured in Sentry
213- * @param {object } options A specific set of options for this message [optional]
214- * @return {Raven }
215- */
209+ /**
210+ * Manually send a message to Sentry
211+ *
212+ * @param {string } msg A plain message to be captured in Sentry
213+ * @param {object } options A specific set of options for this message [optional]
214+ * @return {Raven }
215+ */
216216 captureMessage ( msg : string , options ?: RavenOptions ) : RavenStatic ;
217217
218218 /** Log a breadcrumb */
219219 captureBreadcrumb ( crumb : Breadcrumb ) : RavenStatic ;
220220
221- /*
222- * Set/Clear a user to be sent along with the payload.
223- *
224- * @param {object } user An object representing user data [optional]
225- * If user is undefined, the current user context will be removed.
226- * @return {Raven }
227- */
228- setUserContext ( user ?: {
229- [ key : string ] : any ;
230- } ) : RavenStatic ;
231-
232- /*
233- * Merge extra attributes to be sent along with the payload.
234- *
235- * @param {object } context A set of data to be merged with the current extra context data [optional]
236- * If context is undefined, the current extra context data will be removed.
237- * @return {Raven }
238- */
221+ /**
222+ * Set/Clear a user to be sent along with the payload.
223+ *
224+ * @param {object } user An object representing user data [optional]
225+ * If user is undefined, the current user context will be removed.
226+ * @return {Raven }
227+ */
228+ setUserContext ( user ?: { [ key : string ] : any } ) : RavenStatic ;
229+
230+ /**
231+ * Merge extra attributes to be sent along with the payload.
232+ *
233+ * @param {object } context A set of data to be merged with the current extra context data [optional]
234+ * If context is undefined, the current extra context data will be removed.
235+ * @return {Raven }
236+ */
239237 setExtraContext ( context ?: Object ) : RavenStatic ;
240238
241- /*
242- * Merge tags to be sent along with the payload.
243- *
244- * @param {object } tags A set of data to be merged with the current tag context data [optional]
245- * If tags is undefined, the current tag context data will be removed.
246- * @return {Raven }
247- */
239+ /**
240+ * Merge tags to be sent along with the payload.
241+ *
242+ * @param {object } tags A set of data to be merged with the current tag context data [optional]
243+ * If tags is undefined, the current tag context data will be removed.
244+ * @return {Raven }
245+ */
248246 setTagsContext ( tags ?: Object ) : RavenStatic ;
249247
250248 /** Clear all of the context. */
@@ -285,11 +283,11 @@ declare namespace Raven {
285283 /** Show Sentry user feedback dialog */
286284 showReportDialog ( options ?: Object ) : void ;
287285
288- /*
289- * Configure Raven DSN
290- *
291- * @param {string } dsn The public Sentry DSN
292- */
286+ /**
287+ * Configure Raven DSN
288+ *
289+ * @param {string } dsn The public Sentry DSN
290+ */
293291 setDSN ( dsn : string ) : void ;
294292 }
295293
@@ -329,5 +327,14 @@ declare namespace Raven {
329327 sentry ?: boolean ;
330328 }
331329
332- type LogLevel = 'critical' | 'error' | 'warning' | 'info' | 'debug' | 'warn' | 'log' ;
330+ /** Event/Breadcrumb Severity. `critical` is for Breadcrumbs only and `fatal` is for Events only. */
331+ type LogLevel =
332+ | 'critical'
333+ | 'fatal'
334+ | 'error'
335+ | 'warning'
336+ | 'info'
337+ | 'debug'
338+ | 'warn'
339+ | 'log' ;
333340}
0 commit comments