File tree Expand file tree Collapse file tree 4 files changed +11
-14
lines changed Expand file tree Collapse file tree 4 files changed +11
-14
lines changed Original file line number Diff line number Diff line change 11import { Client } from '@sentry/types' ;
2- import * as domain from 'domain' ;
32
43import { Hub } from './hub' ;
54import { Scope } from './scope' ;
@@ -25,13 +24,8 @@ export interface Carrier {
2524 */
2625 extensions ?: {
2726 /** Hack to prevent bundlers from breaking our usage of the domain package in the cross-platform Hub package */
28- domain ?: typeof domain & {
29- /**
30- * The currently active domain. This is part of the domain package, but for some reason not declared in the
31- * package's typedef.
32- */
33- active ?: domain . Domain ;
34- } ;
27+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
28+ domain ?: { [ key : string ] : any } ;
3529 } & {
3630 /** Extension methods for the hub, which are bound to the current Hub instance */
3731 // eslint-disable-next-line @typescript-eslint/ban-types
@@ -40,4 +34,7 @@ export interface Carrier {
4034 } ;
4135}
4236
43- export interface DomainAsCarrier extends domain . Domain , Carrier { }
37+ export interface DomainAsCarrier extends Carrier {
38+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
39+ members : { [ key : string ] : any } [ ] ;
40+ }
Original file line number Diff line number Diff line change @@ -477,10 +477,12 @@ export class Scope implements ScopeInterface {
477477 * Retruns the global event processors.
478478 */
479479function getGlobalEventProcessors ( ) : EventProcessor [ ] {
480- const global = getGlobalObject < Window | NodeJS . Global > ( ) ;
480+ /* eslint-disable @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-member-access */
481+ const global = getGlobalObject < any > ( ) ;
481482 global . __SENTRY__ = global . __SENTRY__ || { } ;
482483 global . __SENTRY__ . globalEventProcessors = global . __SENTRY__ . globalEventProcessors || [ ] ;
483484 return global . __SENTRY__ . globalEventProcessors ;
485+ /* eslint-enable @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-member-access */
484486}
485487
486488/**
Original file line number Diff line number Diff line change 44 "exclude" : [" dist" ],
55 "compilerOptions" : {
66 "rootDir" : " ." ,
7- "types" : [" node " , " jest" ]
7+ "types" : [" jest" ]
88 }
99}
Original file line number Diff line number Diff line change @@ -140,9 +140,7 @@ function getDefaultSamplingContext(transactionContext: TransactionContext): Samp
140140 // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
141141 const requestType = nodeHttpModule . IncomingMessage ;
142142
143- // eslint-disable-next-line @typescript-eslint/no-explicit-any
144- const request = domain . members . find ( ( member : any ) => isInstanceOf ( member , requestType ) ) ;
145-
143+ const request = domain . members . find ( member => isInstanceOf ( member , requestType ) ) ;
146144 if ( request ) {
147145 defaultSamplingContext . request = extractNodeRequestData ( request ) ;
148146 }
You can’t perform that action at this time.
0 commit comments