From 434c8da56c1a169c049e7c679719845cc4c9a983 Mon Sep 17 00:00:00 2001 From: Brett Beutell Date: Thu, 29 Aug 2024 08:09:43 +0200 Subject: [PATCH] Fix the typing of app.fetch for Node envs --- packages/client-library-otel/src/instrumentation.ts | 2 +- packages/client-library-otel/src/types.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/client-library-otel/src/instrumentation.ts b/packages/client-library-otel/src/instrumentation.ts index d2203f551..00da148b6 100644 --- a/packages/client-library-otel/src/instrumentation.ts +++ b/packages/client-library-otel/src/instrumentation.ts @@ -80,7 +80,7 @@ export function instrument(app: HonoLikeApp, config?: FpxConfigOptions) { request: Request, // Name this "rawEnv" because we coerce it below into something that's easier to work with rawEnv: HonoLikeEnv, - executionContext: ExecutionContext | undefined, + executionContext?: ExecutionContext, ) { const env = rawEnv as | undefined diff --git a/packages/client-library-otel/src/types.ts b/packages/client-library-otel/src/types.ts index e592359af..20cb66fc8 100644 --- a/packages/client-library-otel/src/types.ts +++ b/packages/client-library-otel/src/types.ts @@ -40,7 +40,7 @@ export type HonoResponse = Awaited; export type HonoLikeFetch = ( request: Request, env: HonoLikeEnv, - executionContext: ExecutionContext | undefined, + executionContext?: ExecutionContext, ) => HonoFetchResult; // type HonoLikeFetch = Hono["fetch"];