Skip to content
This repository has been archived by the owner on Jun 27, 2024. It is now read-only.

Commit

Permalink
fix: define Variables type globally (#174)
Browse files Browse the repository at this point in the history
  • Loading branch information
boywithkeyboard authored Aug 16, 2023
1 parent 9268017 commit b69de26
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
3 changes: 1 addition & 2 deletions context.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
// Copyright 2023 Samuel Kopp. All rights reserved. Apache-2.0 license.
/// <reference types='./env.d.ts' />
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<string, unknown>

const HTTP_MESSAGES = {
'Bad Request': 400,
'Unauthorized': 401,
Expand Down
5 changes: 5 additions & 0 deletions env.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
declare global {
type Variables = Record<string, unknown>
}

export {}

0 comments on commit b69de26

Please sign in to comment.