diff --git a/deno_dist/middleware/method-override/index.ts b/deno_dist/middleware/method-override/index.ts index 60e399ac9..f9748990b 100644 --- a/deno_dist/middleware/method-override/index.ts +++ b/deno_dist/middleware/method-override/index.ts @@ -1,5 +1,5 @@ import { URLSearchParams } from 'node:url' -import type { Context } from '../../context.ts' +import type { Context, ExecutionContext } from '../../context.ts' import type { Hono } from '../../hono.ts' import type { MiddlewareHandler } from '../../types.ts' import { parseBody } from '../../utils/body.ts' diff --git a/deno_dist/mod.ts b/deno_dist/mod.ts index 4f0441b56..fe45b6633 100644 --- a/deno_dist/mod.ts +++ b/deno_dist/mod.ts @@ -1,12 +1,5 @@ import { Hono } from './hono.ts' -declare global { - interface ExecutionContext { - waitUntil(promise: Promise): void - passThroughOnException(): void - } -} - export type { Env, ErrorHandler, diff --git a/src/hono.test.ts b/src/hono.test.ts index 3a79dac82..b1f36ca2f 100644 --- a/src/hono.test.ts +++ b/src/hono.test.ts @@ -2,7 +2,7 @@ /* eslint-disable @typescript-eslint/ban-ts-comment */ import { expectTypeOf } from 'vitest' import { hc } from './client' -import type { Context } from './context' +import type { Context, ExecutionContext } from './context' import { Hono } from './hono' import { HTTPException } from './http-exception' import { logger } from './middleware/logger' diff --git a/src/middleware/cache/index.test.ts b/src/middleware/cache/index.test.ts index 1e0750fcc..47107c9b1 100644 --- a/src/middleware/cache/index.test.ts +++ b/src/middleware/cache/index.test.ts @@ -1,3 +1,4 @@ +import type { ExecutionContext } from '../../context' import { Hono } from '../../hono' import { cache } from '.' diff --git a/src/middleware/method-override/index.ts b/src/middleware/method-override/index.ts index 0e942ec29..6102078d8 100644 --- a/src/middleware/method-override/index.ts +++ b/src/middleware/method-override/index.ts @@ -1,5 +1,5 @@ import { URLSearchParams } from 'url' -import type { Context } from '../../context' +import type { Context, ExecutionContext } from '../../context' import type { Hono } from '../../hono' import type { MiddlewareHandler } from '../../types' import { parseBody } from '../../utils/body' diff --git a/src/mod.ts b/src/mod.ts index 23be60d8c..674f8de64 100644 --- a/src/mod.ts +++ b/src/mod.ts @@ -1,12 +1,5 @@ import { Hono } from './hono' -declare global { - interface ExecutionContext { - waitUntil(promise: Promise): void - passThroughOnException(): void - } -} - export type { Env, ErrorHandler,