Skip to content

Commit

Permalink
Remove Env from index.ts (#6790)
Browse files Browse the repository at this point in the history
  • Loading branch information
penalosa committed Sep 23, 2024
1 parent 7d7f19a commit 9e44d88
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 49 deletions.
5 changes: 5 additions & 0 deletions .changeset/proud-hats-notice.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"create-cloudflare": patch
---

fix: Remove `Env` from index.ts in the Hello World Durable Objects & Hello World Durable Objects w/ assets templates
Original file line number Diff line number Diff line change
Expand Up @@ -14,26 +14,6 @@ import { DurableObject } from "cloudflare:workers";
*/


/**
* Associate bindings declared in wrangler.toml with the TypeScript type system
*/
export interface Env {
// Example binding to KV. Learn more at https://developers.cloudflare.com/workers/runtime-apis/kv/
// MY_KV_NAMESPACE: KVNamespace;
//
// Example binding to Durable Object. Learn more at https://developers.cloudflare.com/workers/runtime-apis/durable-objects/
MY_DURABLE_OBJECT: DurableObjectNamespace<MyDurableObject>;
//
// Example binding to R2. Learn more at https://developers.cloudflare.com/workers/runtime-apis/r2/
// MY_BUCKET: R2Bucket;
//
// Example binding to a Service. Learn more at https://developers.cloudflare.com/workers/runtime-apis/service-bindings/
// MY_SERVICE: Fetcher;
//
// Example binding to a Queue. Learn more at https://developers.cloudflare.com/queues/javascript-apis/
// MY_QUEUE: Queue;
}

/** A Durable Object's behavior is defined in an exported Javascript class */
export class MyDurableObject extends DurableObject {
/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// Generated by Wrangler
// After adding bindings to `wrangler.toml`, regenerate this interface via `npm run cf-typegen`
// Generated by Wrangler by running `wrangler types`

interface Env {
MY_DURABLE_OBJECT: DurableObjectNamespace;
MY_DURABLE_OBJECT: DurableObjectNamespace<import("./src/index").MyDurableObject>;
}

Original file line number Diff line number Diff line change
Expand Up @@ -13,27 +13,6 @@ import { DurableObject } from "cloudflare:workers";
* Learn more at https://developers.cloudflare.com/durable-objects
*/


/**
* Associate bindings declared in wrangler.toml with the TypeScript type system
*/
export interface Env {
// Example binding to KV. Learn more at https://developers.cloudflare.com/workers/runtime-apis/kv/
// MY_KV_NAMESPACE: KVNamespace;
//
// Example binding to Durable Object. Learn more at https://developers.cloudflare.com/workers/runtime-apis/durable-objects/
MY_DURABLE_OBJECT: DurableObjectNamespace<MyDurableObject>;
//
// Example binding to R2. Learn more at https://developers.cloudflare.com/workers/runtime-apis/r2/
// MY_BUCKET: R2Bucket;
//
// Example binding to a Service. Learn more at https://developers.cloudflare.com/workers/runtime-apis/service-bindings/
// MY_SERVICE: Fetcher;
//
// Example binding to a Queue. Learn more at https://developers.cloudflare.com/queues/javascript-apis/
// MY_QUEUE: Queue;
}

/** A Durable Object's behavior is defined in an exported Javascript class */
export class MyDurableObject extends DurableObject {
/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// Generated by Wrangler
// After adding bindings to `wrangler.toml`, regenerate this interface via `npm run cf-typegen`
// Generated by Wrangler by running `wrangler types`

interface Env {
MY_DURABLE_OBJECT: DurableObjectNamespace;
MY_DURABLE_OBJECT: DurableObjectNamespace<import("./src/index").MyDurableObject>;
}

0 comments on commit 9e44d88

Please sign in to comment.