From 3456831b82c4b95887cd96761e91b5edec95d683 Mon Sep 17 00:00:00 2001 From: aab Date: Fri, 3 Mar 2023 12:49:12 +0700 Subject: [PATCH] docs: Fix variable name in transpiler API docs (#2281) --- docs/api/transpiler.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/api/transpiler.md b/docs/api/transpiler.md index 44196a99c3..09e28ba0de 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

{props.title}

; }`; -const result = tx.transformSync(code); +const result = transpiler.transformSync(code); ``` ```js#Result