Skip to content

Commit 1497c57

Browse files
authored
Apply suggestions from code review
1 parent 3e8f9d7 commit 1497c57

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

src/content/docs/durable-objects/api/namespace.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ export class MyDurableObject extends DurableObject {
2929
export default {
3030
async fetch(request, env) {
3131
// A stub is a client Object used to invoke methods defined by the Durable Object
32-
const stub = env.MY_DURABLE_OBJECT.getByName("foo);
32+
const stub = env.MY_DURABLE_OBJECT.getByName("foo");
3333
...
3434
}
3535
}
@@ -141,7 +141,7 @@ const stub = env.MY_DURABLE_OBJECT.get(id);
141141

142142
### `getByName`
143143

144-
`getByName` obtains a [`DurableObjectStub`](/durable-objects/api/stub) from a provided name which can be used to invoke methods on a Durable Object.
144+
`getByName` obtains a [`DurableObjectStub`](/durable-objects/api/stub) from a provided name, which can be used to invoke methods on a Durable Object.
145145

146146
This method returns the <GlossaryTooltip term="stub">stub</GlossaryTooltip> immediately, often before a connection has been established to the Durable Object. This allows requests to be sent to the instance right away, without waiting for a network round trip.
147147

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ export class MyDurableObject extends DurableObject<Env> {
160160

161161
}
162162

163-
````
163+
```
164164
</TypeScriptExample>
165165

166166
<TabItem label="Python" icon="seti:python">
@@ -178,7 +178,7 @@ class MyDurableObject(DurableObject):
178178
.one()
179179

180180
return result.greeting
181-
````
181+
```
182182

183183
</TabItem>
184184

@@ -218,7 +218,7 @@ export default {
218218

219219
} satisfies ExportedHandler<Env>;
220220

221-
````
221+
```
222222
</TypeScriptExample>
223223

224224
<TabItem label="Python" icon="seti:python">
@@ -233,7 +233,7 @@ class Default(WorkerEntrypoint):
233233
stub = env.MY_DURABLE_OBJECT.getByName(url.path)
234234
greeting = await stub.say_hello()
235235
return Response(greeting)
236-
````
236+
```
237237

238238
</TabItem>
239239

@@ -345,7 +345,7 @@ const stub = env.MY_DURABLE_OBJECT.getByName(new URL(request.url).pathname);
345345

346346
} satisfies ExportedHandler<Env>;
347347

348-
````
348+
```
349349
</TypeScriptExample>
350350

351351
<TabItem label="Python" icon="seti:python">
@@ -371,7 +371,7 @@ class Default(WorkerEntrypoint):
371371
stub = env.MY_DURABLE_OBJECT.getByName(url.path)
372372
greeting = await stub.say_hello()
373373
return Response(greeting)
374-
````
374+
```
375375

376376
</TabItem>
377377

0 commit comments

Comments
 (0)