11import { API } from '@sentry/core' ;
2- import { Event , Response , SentryRequestType , Status , Transport , TransportOptions } from '@sentry/types' ;
2+ import {
3+ Event ,
4+ Response as SentryResponse ,
5+ SentryRequestType ,
6+ Status ,
7+ Transport ,
8+ TransportOptions ,
9+ } from '@sentry/types' ;
310import { logger , parseRetryAfterHeader , PromiseBuffer , SentryError } from '@sentry/utils' ;
411
512/** Base Transport class implementation */
@@ -13,7 +20,7 @@ export abstract class BaseTransport implements Transport {
1320 protected readonly _api : API ;
1421
1522 /** A simple buffer holding all requests. */
16- protected readonly _buffer : PromiseBuffer < Response > = new PromiseBuffer ( 30 ) ;
23+ protected readonly _buffer : PromiseBuffer < SentryResponse > = new PromiseBuffer ( 30 ) ;
1724
1825 /** Locks transport after receiving rate limits in a response */
1926 protected readonly _rateLimits : Record < string , Date > = { } ;
@@ -27,7 +34,7 @@ export abstract class BaseTransport implements Transport {
2734 /**
2835 * @inheritDoc
2936 */
30- public sendEvent ( _ : Event ) : PromiseLike < Response > {
37+ public sendEvent ( _ : Event ) : PromiseLike < SentryResponse > {
3138 throw new SentryError ( 'Transport Class has to implement `sendEvent` method' ) ;
3239 }
3340
@@ -49,9 +56,9 @@ export abstract class BaseTransport implements Transport {
4956 reject,
5057 } : {
5158 requestType : SentryRequestType ;
52- response : globalThis . Response | XMLHttpRequest ;
59+ response : Response | XMLHttpRequest ;
5360 headers : Record < string , string | null > ;
54- resolve : ( value ?: Response | PromiseLike < Response > | null | undefined ) => void ;
61+ resolve : ( value ?: SentryResponse | PromiseLike < SentryResponse > | null | undefined ) => void ;
5562 reject : ( reason ?: unknown ) => void ;
5663 } ) : void {
5764 const status = Status . fromHttpCode ( response . status ) ;
0 commit comments