Skip to content

Commit

Permalink
Try to fix formatting in rendered guides document (#13077)
Browse files Browse the repository at this point in the history
  • Loading branch information
guest271314 authored Aug 4, 2024
1 parent fd84ace commit ce1286e
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions docs/guides/runtime/import-json.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,16 @@ data.author.name; // => "John Dough"

---

Bun also supports [Import Attributes](https://github.com/tc39/proposal-import-attributes/) and [JSON modules](https://github.com/tc39/proposal-json-modules) syntax.

```ts
import data from "./package.json" with { type: "json" };

data.name; // => "bun"
data.version; // => "1.0.0"
data.author.name; // => "John Dough"
```

---

See [Docs > Runtime > TypeScript](/docs/runtime/typescript) for more information on using TypeScript with Bun.

0 comments on commit ce1286e

Please sign in to comment.