1
- import { addGlobalEventProcessor , getCurrentHub } from '@sentry/hub' ;
2
- import { Event , Integration , StackFrame } from '@sentry/types' ;
1
+ import { Event , EventProcessor , Hub , Integration , StackFrame } from '@sentry/types' ;
3
2
import { getEventDescription , isDebugBuild , isMatchingPattern , logger } from '@sentry/utils' ;
4
3
5
4
// "Script error." is hard coded into browsers for errors that it can't read.
6
5
// this is the result of a script being pulled in from an external domain and CORS.
7
6
const DEFAULT_IGNORE_ERRORS = [ / ^ S c r i p t e r r o r \. ? $ / , / ^ J a v a s c r i p t e r r o r : S c r i p t e r r o r \. ? o n l i n e 0 $ / ] ;
8
7
9
8
/** JSDoc */
10
- interface InboundFiltersOptions {
9
+ export interface InboundFiltersOptions {
11
10
allowUrls : Array < string | RegExp > ;
12
11
denyUrls : Array < string | RegExp > ;
13
12
ignoreErrors : Array < string | RegExp > ;
@@ -36,7 +35,7 @@ export class InboundFilters implements Integration {
36
35
/**
37
36
* @inheritDoc
38
37
*/
39
- public setupOnce ( ) : void {
38
+ public setupOnce ( addGlobalEventProcessor : ( callback : EventProcessor ) => void , getCurrentHub : ( ) => Hub ) : void {
40
39
addGlobalEventProcessor ( ( event : Event ) => {
41
40
const hub = getCurrentHub ( ) ;
42
41
if ( hub ) {
@@ -55,7 +54,7 @@ export class InboundFilters implements Integration {
55
54
56
55
/** JSDoc */
57
56
export function _mergeOptions (
58
- intOptions : Partial < InboundFiltersOptions > ,
57
+ intOptions : Partial < InboundFiltersOptions > = { } ,
59
58
clientOptions : Partial < InboundFiltersOptions > = { } ,
60
59
) : Partial < InboundFiltersOptions > {
61
60
return {
0 commit comments