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

fix: define Variables type globally #174

Merged
merged 1 commit into from
Aug 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 {}