@@ -28,7 +28,7 @@ export class Angular implements Integration {
28
28
/**
29
29
* Angular's instance
30
30
*/
31
- private readonly _angular : ng . IAngularStatic ;
31
+ private readonly _angular : any ;
32
32
33
33
/**
34
34
* Returns current hub.
@@ -38,9 +38,9 @@ export class Angular implements Integration {
38
38
/**
39
39
* @inheritDoc
40
40
*/
41
- public constructor ( options : { angular ?: ng . IAngularStatic } = { } ) {
41
+ public constructor ( options : { angular ?: any } = { } ) {
42
42
// tslint:disable-next-line: no-unsafe-any
43
- this . _angular = options . angular || ( getGlobalObject ( ) . angular as ng . IAngularStatic ) ;
43
+ this . _angular = options . angular || getGlobalObject ( ) . angular ;
44
44
}
45
45
46
46
/**
@@ -54,18 +54,21 @@ export class Angular implements Integration {
54
54
55
55
this . _getCurrentHub = getCurrentHub ;
56
56
57
+ // tslint:disable: no-unsafe-any
57
58
this . _angular . module ( Angular . moduleName , [ ] ) . config ( [
58
59
'$provide' ,
59
- ( $provide : ng . auto . IProvideService ) => {
60
+ ( $provide : any ) => {
60
61
$provide . decorator ( '$exceptionHandler' , [ '$delegate' , this . _$exceptionHandlerDecorator . bind ( this ) ] ) ;
61
62
} ,
62
63
] ) ;
64
+ // tslint:enable: no-unsafe-any
63
65
}
64
66
65
67
/**
66
68
* Angular's exceptionHandler for Sentry integration
67
69
*/
68
- private _$exceptionHandlerDecorator ( $delegate : ng . IExceptionHandlerService ) : ng . IExceptionHandlerService {
70
+ // tslint:disable-next-line: no-unsafe-any
71
+ private _$exceptionHandlerDecorator ( $delegate : any ) : any {
69
72
return ( exception : Error , cause ?: string ) => {
70
73
const hub = this . _getCurrentHub && this . _getCurrentHub ( ) ;
71
74
@@ -100,6 +103,7 @@ export class Angular implements Integration {
100
103
hub . captureException ( exception ) ;
101
104
} ) ;
102
105
}
106
+ // tslint:disable-next-line: no-unsafe-any
103
107
$delegate ( exception , cause ) ;
104
108
} ;
105
109
}
0 commit comments