Skip to content

Commit 3a3d746

Browse files
committed
fix: cast body init types in transports
1 parent 1028488 commit 3a3d746

File tree

8 files changed

+7
-8
lines changed

8 files changed

+7
-8
lines changed

packages/aws-serverless/src/lambda-extension/aws-lambda-extension.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ export class AwsLambdaExtension {
115115

116116
fetch(upstreamSentryUrl, {
117117
method: 'POST',
118-
body: envelopeBytes,
118+
body: envelopeBytes as BodyInit,
119119
}).catch(err => {
120120
DEBUG_BUILD && debug.error('Error sending envelope to Sentry', err);
121121
});

packages/browser/src/feedbackAsync.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@ import { lazyLoadIntegration } from './utils/lazyLoadIntegration';
55
* An integration to add user feedback to your application,
66
* while loading most of the code lazily only when it's needed.
77
*/
8-
export const feedbackAsyncIntegration = buildFeedbackIntegration({
8+
export const feedbackAsyncIntegration: ReturnType<typeof buildFeedbackIntegration> = buildFeedbackIntegration({
99
lazyLoadIntegration,
1010
});

packages/browser/src/feedbackSync.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import {
55
} from '@sentry-internal/feedback';
66

77
/** Add a widget to capture user feedback to your application. */
8-
export const feedbackSyncIntegration = buildFeedbackIntegration({
8+
export const feedbackSyncIntegration: ReturnType<typeof buildFeedbackIntegration> = buildFeedbackIntegration({
99
getModalIntegration: () => feedbackModalIntegration,
1010
getScreenshotIntegration: () => feedbackScreenshotIntegration,
1111
});

packages/browser/src/integrations/spotlight.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ function setupSidecarForwarding(client: Client, sidecarUrl: string): void {
4444

4545
makeFetch(sidecarUrl, {
4646
method: 'POST',
47-
body: serializeEnvelope(envelope),
47+
body: serializeEnvelope(envelope) as BodyInit,
4848
headers: {
4949
'Content-Type': 'application/x-sentry-envelope',
5050
},

packages/browser/src/transports/fetch.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ export function makeFetchTransport(
2222
pendingCount++;
2323

2424
const requestOptions: RequestInit = {
25-
body: request.body,
25+
body: request.body as BodyInit,
2626
method: 'POST',
2727
referrerPolicy: 'strict-origin',
2828
headers: options.headers,

packages/deno/src/transports/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ export function makeFetchTransport(options: BaseTransportOptions): Transport {
2424

2525
function makeRequest(request: TransportRequest): PromiseLike<TransportMakeRequestResponse> {
2626
const requestOptions: RequestInit = {
27-
body: request.body,
27+
body: request.body as BodyInit,
2828
method: 'POST',
2929
referrerPolicy: 'strict-origin',
3030
headers: options.headers,

packages/feedback/tsconfig.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
"jsx": "react-jsx",
88
"jsxImportSource": "preact",
99
"skipLibCheck": true,
10-
"baseUrl": "./",
1110
"paths": {
1211
"react": ["./node_modules/preact/compat/"],
1312
"react-dom": ["./node_modules/preact/compat/"]

packages/vercel-edge/src/transports/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ export class IsolatedPromiseBuffer {
8080
export function makeEdgeTransport(options: VercelEdgeTransportOptions): Transport {
8181
function makeRequest(request: TransportRequest): PromiseLike<TransportMakeRequestResponse> {
8282
const requestOptions: RequestInit = {
83-
body: request.body,
83+
body: request.body as BodyInit,
8484
method: 'POST',
8585
headers: options.headers,
8686
...options.fetchOptions,

0 commit comments

Comments
 (0)