From ca6e80e31ae2901d2358de9caf860bb430b9aa47 Mon Sep 17 00:00:00 2001 From: Samuel Kopp <62482066+boywithkeyboard@users.noreply.github.com> Date: Wed, 16 Aug 2023 02:37:12 +0200 Subject: [PATCH] fix: define `Variables` type globally --- context.ts | 3 +-- env.d.ts | 5 +++++ 2 files changed, 6 insertions(+), 2 deletions(-) create mode 100644 env.d.ts diff --git a/context.ts b/context.ts index 8b6c727..241fe06 100644 --- a/context.ts +++ b/context.ts @@ -1,12 +1,11 @@ // Copyright 2023 Samuel Kopp. All rights reserved. Apache-2.0 license. +/// import { ZodType } from 'https://deno.land/x/zod@v3.21.4/types.ts' import { AppContext } from './cheetah.ts' import { ObjectType, Payload } from './handler.ts' import { RequestContext } from './request_context.ts' import { ResponseContext } from './response_context.ts' -type Variables = Record - const HTTP_MESSAGES = { 'Bad Request': 400, 'Unauthorized': 401, diff --git a/env.d.ts b/env.d.ts new file mode 100644 index 0000000..285808e --- /dev/null +++ b/env.d.ts @@ -0,0 +1,5 @@ +declare global { + type Variables = Record +} + +export {}