Skip to content

Commit bb499e9

Browse files
committed
Adding type to Durable Object ID.
1 parent 8c88a7a commit bb499e9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/content/docs/durable-objects/get-started.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ export class MyDurableObject extends DurableObject<Env> {
279279
}
280280
export default {
281281
async fetch(request, env, ctx):Promise<Response> {
282-
const id = env.MY_DURABLE_OBJECT.idFromName(new URL(request.url).pathname);
282+
const id:DurableObjectId = env.MY_DURABLE_OBJECT.idFromName(new URL(request.url).pathname);
283283

284284
const stub = env.MY_DURABLE_OBJECT.get(id);
285285

0 commit comments

Comments
 (0)