Skip to content

Commit

Permalink
added default types
Browse files Browse the repository at this point in the history
  • Loading branch information
AirBorne04 authored and AirBorne04 committed Oct 25, 2022
1 parent 022bf01 commit 0298664
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/integrations/cloudflare/src/runtime.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
export type WorkerRuntime<T> = {
export type WorkerRuntime<T = unknown> = {
name: 'cloudflare';
env: T;
waitUntil(promise: Promise<any>): void;
passThroughOnException(): void;
};

export type PagesRuntime<T, U> = {
export type PagesRuntime<T = unknown, U = unknown> = {
name: 'cloudflare';
env: T;
functionPath: string;
Expand All @@ -15,6 +15,6 @@ export type PagesRuntime<T, U> = {
next(request: Request): void;
};

export function getRuntime<T, U>(request: Request): WorkerRuntime<T> | PagesRuntime<T, U> {
export function getRuntime<T = unknown, U = unknown>(request: Request): WorkerRuntime<T> | PagesRuntime<T, U> {
return Reflect.get(request, Symbol.for('runtime'));
}

0 comments on commit 0298664

Please sign in to comment.