Skip to content

Commit 93d98ee

Browse files
committed
fix type errors in serverless tests
1 parent 2e907bc commit 93d98ee

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

packages/serverless/src/awslambda.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ export function wrapHandler<TEvent, TResult>(
279279
scope.setTag('timeout', humanReadableTimeout);
280280
captureMessage(`Possible function timeout: ${context.functionName}`, 'warning');
281281
});
282-
}, timeoutWarningDelay);
282+
}, timeoutWarningDelay) as unknown as NodeJS.Timeout;
283283
}
284284

285285
// Applying `sentry-trace` to context

packages/serverless/src/gcpfunction/http.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ function _wrapHttpFunction(fn: HttpFunction, wrapOptions: Partial<HttpFunctionWr
8686
// eslint-disable-next-line @typescript-eslint/unbound-method
8787
const _end = res.end;
8888
// eslint-disable-next-line @typescript-eslint/no-explicit-any
89-
res.end = function (chunk?: any | (() => void), encoding?: string | (() => void), cb?: () => void): void {
89+
res.end = function (chunk?: any | (() => void), encoding?: string | (() => void), cb?: () => void): any {
9090
transaction.setHttpStatus(res.statusCode);
9191
transaction.finish();
9292

packages/serverless/test/google-cloud-http.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ describe('GoogleCloudHttp tracing', () => {
6262
op: 'gcloud.http.bigquery',
6363
description: 'POST /jobs',
6464
});
65+
// @ts-ignore see "Why @ts-ignore" note
6566
expect(Sentry.fakeTransaction.startChild).toBeCalledWith({
6667
op: 'gcloud.http.bigquery',
6768
description: expect.stringMatching(new RegExp('^GET /queries/.+')),

0 commit comments

Comments
 (0)