未验证 提交 ec3f4458 编写于 作者: Y Yoshiya Hinosawa 提交者: GitHub

docs: fix Deno.compile examples in manual.md (#4380)

上级 6471d4cf
......@@ -673,7 +673,7 @@ TypeScript code that is destined for the browser, you would want to use the
TypeScript `"dom"` library:
```ts
const [errors, emitted] = Deno.compile(
const [errors, emitted] = await Deno.compile(
"main.ts",
{
"main.ts": `document.getElementById("foo");\n`
......@@ -713,7 +713,7 @@ So to add the Deno namespace to a compilation, you would include the `deno.ns`
lib in the array. For example:
```ts
const [errors, emitted] = Deno.compile(
const [errors, emitted] = await Deno.compile(
"main.ts",
{
"main.ts": `document.getElementById("foo");\n`
......@@ -744,7 +744,7 @@ document.getElementById("foo");
It would compiler without errors like this:
```ts
const [errors, emitted] = Deno.compile("./main.ts", undefined, {
const [errors, emitted] = await Deno.compile("./main.ts", undefined, {
lib: ["esnext"]
});
```
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册