docs: Fix variable name in transpiler API docs (#2281)

This commit is contained in:
aab
2023-03-03 12:49:12 +07:00
committed by GitHub
parent 6a1701fedd
commit 3456831b82

View File

@@ -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