summaryrefslogtreecommitdiff
path: root/std/manual.md
diff options
context:
space:
mode:
authorKitson Kelly <me@kitsonkelly.com>2020-03-29 04:03:49 +1100
committerGitHub <noreply@github.com>2020-03-28 13:03:49 -0400
commitbced52505f32d6cca4f944bb610a8a26767908a8 (patch)
treeda49a5df4b7bd6f8306248069228cd6bd0db1303 /std/manual.md
parent1397b8e0e7c85762e19d88fde103342bfa563360 (diff)
Update to Prettier 2 and use ES Private Fields (#4498)
Diffstat (limited to 'std/manual.md')
-rw-r--r--std/manual.md24
1 files changed, 12 insertions, 12 deletions
diff --git a/std/manual.md b/std/manual.md
index f073d1508..1e8fefcb1 100644
--- a/std/manual.md
+++ b/std/manual.md
@@ -366,7 +366,7 @@ Example:
```ts
// create subprocess
const p = Deno.run({
- cmd: ["echo", "hello"]
+ cmd: ["echo", "hello"],
});
// await its completion
@@ -398,10 +398,10 @@ const p = Deno.run({
"run",
"--allow-read",
"https://deno.land/std/examples/cat.ts",
- ...fileNames
+ ...fileNames,
],
stdout: "piped",
- stderr: "piped"
+ stderr: "piped",
});
const { code } = await p.status();
@@ -557,7 +557,7 @@ assertion library across a large project. Rather than importing
export {
assert,
assertEquals,
- assertStrContains
+ assertStrContains,
} from "https://deno.land/std/testing/asserts.ts";
```
@@ -676,10 +676,10 @@ TypeScript `"dom"` library:
const [errors, emitted] = await Deno.compile(
"main.ts",
{
- "main.ts": `document.getElementById("foo");\n`
+ "main.ts": `document.getElementById("foo");\n`,
},
{
- lib: ["dom", "esnext"]
+ lib: ["dom", "esnext"],
}
);
```
@@ -716,10 +716,10 @@ lib in the array. For example:
const [errors, emitted] = await Deno.compile(
"main.ts",
{
- "main.ts": `document.getElementById("foo");\n`
+ "main.ts": `document.getElementById("foo");\n`,
},
{
- lib: ["dom", "esnext", "deno.ns"]
+ lib: ["dom", "esnext", "deno.ns"],
}
);
```
@@ -745,7 +745,7 @@ It would compiler without errors like this:
```ts
const [errors, emitted] = await Deno.compile("./main.ts", undefined, {
- lib: ["esnext"]
+ lib: ["esnext"],
});
```
@@ -1059,7 +1059,7 @@ An example of providing sources:
```ts
const [diagnostics, emitMap] = await Deno.compile("/foo.ts", {
"/foo.ts": `import * as bar from "./bar.ts";\nconsole.log(bar);\n`,
- "/bar.ts": `export const bar = "bar";\n`
+ "/bar.ts": `export const bar = "bar";\n`,
});
assert(diagnostics == null); // ensuring no diagnostics are returned
@@ -1104,7 +1104,7 @@ An example of providing sources:
```ts
const [diagnostics, emit] = await Deno.bundle("/foo.ts", {
"/foo.ts": `import * as bar from "./bar.ts";\nconsole.log(bar);\n`,
- "/bar.ts": `export const bar = "bar";\n`
+ "/bar.ts": `export const bar = "bar";\n`,
});
assert(diagnostics == null); // ensuring no diagnostics are returned
@@ -1145,7 +1145,7 @@ An example:
```ts
const result = await Deno.transpileOnly({
- "/foo.ts": `enum Foo { Foo, Bar, Baz };\n`
+ "/foo.ts": `enum Foo { Foo, Bar, Baz };\n`,
});
console.log(result["/foo.ts"].source);