Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

templates(cloudflare-workers): update CacheStorage type reference #10316

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
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
1 change: 1 addition & 0 deletions contributors.yml
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@
- c43721
- camiaei
- CanRau
- caprolactam
- ccssmnn
- cephalization
- chaance
Expand Down
1 change: 1 addition & 0 deletions templates/cloudflare-workers/load-context.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { type CacheStorage } from "@cloudflare/workers-types";
import { type PlatformProxy } from "wrangler";

type GetLoadContextArgs = {
Expand Down
2 changes: 2 additions & 0 deletions templates/cloudflare-workers/server.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { type CacheStorage } from "@cloudflare/workers-types";
import { createRequestHandler, type ServerBuild } from "@remix-run/cloudflare";
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore This file won’t exist if it hasn’t yet been built
Expand All @@ -6,6 +7,7 @@ import { getLoadContext } from "./load-context";

// eslint-disable-next-line @typescript-eslint/no-explicit-any
const handleRemixRequest = createRequestHandler(build as any as ServerBuild);
declare const caches: CacheStorage;

export default {
async fetch(request, env, ctx) {
Expand Down