mirror of
https://github.com/oven-sh/bun
synced 2026-02-02 15:08:46 +00:00
docs: Fix variable name in transpiler API docs (#2281)
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user