Skip to content

Commit a7206a0

Browse files
committed
Fixing linebreaks
1 parent 8f9a85c commit a7206a0

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

src/content/docs/durable-objects/examples/reference-do-name-using-init.mdx

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ sidebar:
1010
description: Access the name from within a Durable Object using RpcTarget.
1111
---
1212

13-
import { TabItem, Tabs, GlossaryTooltip, TypeScriptExample } from "~/components";
13+
import { TabItem, Tabs, GlossaryTooltip } from "~/components";
1414

1515
Once you create a Durable Object using [`idFromName`](/durable-objects/api/namespace/#idfromname), you cannot access the Durable Object [`name`](/durable-objects/api/id/#name) within the Durable Object class itself. Moreover, if you want to set some metadata for the Durable Object, you cannot do it directly in the Durable Object. Instead, you have to pass the metadata to every method you call on the Durable Object, which is not ideal.
1616

@@ -25,7 +25,6 @@ This example does not persist the Durable Object metadata. It demonstrates how t
2525
3. Pass the metadata (name in this example) to a Durable Object method
2626
4. Cleans up the `RpcTarget` class after use
2727

28-
<TypeScriptExample>
2928
```ts
3029
import { DurableObject, RpcTarget } from 'cloudflare:workers';
3130

@@ -143,12 +142,9 @@ export default {
143142
} satisfies ExportedHandler<Env>;
144143

145144
```
146-
</TypeScriptExample>
147-
148145

149146
This example persists the Durable Object metadata. It demonstrates similar steps as the previous example, but uses Durable Object storage to store the metadata.
150147

151-
152148
```ts
153149
import { DurableObject, RpcTarget } from 'cloudflare:workers';
154150

0 commit comments

Comments
 (0)