diff options
author | 2023-03-03 12:49:12 +0700 | |
---|---|---|
committer | 2023-03-02 21:49:12 -0800 | |
commit | 3456831b82c4b95887cd96761e91b5edec95d683 (patch) | |
tree | b4247069da66dc491145e87067977bdc04c58cfe /docs | |
parent | 6a1701fedd016bdef2c3e00f046bfa7111a3110a (diff) | |
download | bun-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.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 |