aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorGravatar aab <aabccd021@gmail.com> 2023-03-03 12:49:12 +0700
committerGravatar GitHub <noreply@github.com> 2023-03-02 21:49:12 -0800
commit3456831b82c4b95887cd96761e91b5edec95d683 (patch)
treeb4247069da66dc491145e87067977bdc04c58cfe /docs
parent6a1701fedd016bdef2c3e00f046bfa7111a3110a (diff)
downloadbun-3456831b82c4b95887cd96761e91b5edec95d683.tar.gz
bun-3456831b82c4b95887cd96761e91b5edec95d683.tar.zst
bun-3456831b82c4b95887cd96761e91b5edec95d683.zip
docs: Fix variable name in transpiler API docs (#2281)
Diffstat (limited to 'docs')
-rw-r--r--docs/api/transpiler.md4
1 files changed, 2 insertions, 2 deletions
diff --git a/docs/api/transpiler.md b/docs/api/transpiler.md
index 44196a99c..09e28ba0d 100644
--- a/docs/api/transpiler.md
+++ b/docs/api/transpiler.md
@@ -1,7 +1,7 @@
Bun exposes its internal transpiler via the `Bun.Transpiler` class. To create an instance of Bun's transpiler:
```ts
-const tx = new Bun.Transpiler({
+const transpiler = new Bun.Transpiler({
loader: "tsx", // "js | "jsx" | "ts" | "tsx"
});
```
@@ -25,7 +25,7 @@ export function Home(props: {title: string}){
return <p>{props.title}</p>;
}`;
-const result = tx.transformSync(code);
+const result = transpiler.transformSync(code);
```
```js#Result