Skip to content

Commit 9550f64

Browse files
authored
Adding a JS version of the TS code snippet. (#18069)
1 parent b78bc01 commit 9550f64

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/content/docs/d1/get-started.mdx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import {
1313
FileTree,
1414
Tabs,
1515
TabItem,
16+
TypeScriptExample
1617
} from "~/components";
1718

1819
This guide instructs you through:
@@ -298,6 +299,7 @@ After you have set up your database, run an SQL query from within your Worker.
298299
2. Clear the content of `index.ts`.
299300
3. Paste the following code snippet into your `index.ts` file:
300301

302+
<TypeScriptExample filename="index.ts">
301303
```typescript
302304
export interface Env {
303305
// If you set another name in wrangler.toml as the value for 'binding',
@@ -325,6 +327,7 @@ After you have set up your database, run an SQL query from within your Worker.
325327
},
326328
} satisfies ExportedHandler<Env>;
327329
```
330+
</TypeScriptExample>
328331

329332
In the code above, you:
330333

0 commit comments

Comments
 (0)