From 5042e92e9ef8b22a143990027ca75454f0560e44 Mon Sep 17 00:00:00 2001 From: Daniel Roe Date: Wed, 1 Jun 2022 08:50:43 +0200 Subject: [PATCH] feat: add `H3EventContext` for type augmentation (#124) --- src/event.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/event.ts b/src/event.ts index 844ab19f..c7f88034 100644 --- a/src/event.ts +++ b/src/event.ts @@ -2,12 +2,14 @@ import type http from 'http' import type { IncomingMessage, ServerResponse, Handler, Middleware } from './types' import { callHandler } from './handler' +export interface H3EventContext extends Record {} + export interface H3Event { '__is_event__': true event: H3Event req: IncomingMessage res: ServerResponse - context: Record + context: H3EventContext } export type CompatibilityEvent = H3Event | IncomingMessage