diff options
Diffstat (limited to 'docs/api')
-rw-r--r-- | docs/api/transpiler.md | 4 |
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 |