summaryrefslogtreecommitdiff
path: root/js/write_file.ts
diff options
context:
space:
mode:
authorKitson Kelly <me@kitsonkelly.com>2018-10-15 07:29:50 +1100
committerRyan Dahl <ry@tinyclouds.org>2018-10-14 17:38:23 -0400
commit10a97679ac80b4304c75d33cbc59c5736d11deb1 (patch)
treeb51b9183ed251f61373069e5c4d35e39603bedb2 /js/write_file.ts
parent1840a1971317f5b8fc6e322b3a414b7f8a593c88 (diff)
Align JSDoc to style guide.
Diffstat (limited to 'js/write_file.ts')
-rw-r--r--js/write_file.ts22
1 files changed, 10 insertions, 12 deletions
diff --git a/js/write_file.ts b/js/write_file.ts
index e34448698..103b7315a 100644
--- a/js/write_file.ts
+++ b/js/write_file.ts
@@ -3,14 +3,13 @@ import * as msg from "gen/msg_generated";
import { flatbuffers } from "flatbuffers";
import * as dispatch from "./dispatch";
-/**
- * Write a new file, with given filename and data synchronously.
+/** Write a new file, with given filename and data synchronously.
*
- * import { writeFileSync } from "deno";
+ * import { writeFileSync } from "deno";
*
- * const encoder = new TextEncoder("utf-8");
- * const data = encoder.encode("Hello world\n");
- * writeFileSync("hello.txt", data);
+ * const encoder = new TextEncoder("utf-8");
+ * const data = encoder.encode("Hello world\n");
+ * writeFileSync("hello.txt", data);
*/
export function writeFileSync(
filename: string,
@@ -20,14 +19,13 @@ export function writeFileSync(
dispatch.sendSync(...req(filename, data, perm));
}
-/**
- * Write a new file, with given filename and data.
+/** Write a new file, with given filename and data.
*
- * import { writeFile } from "deno";
+ * import { writeFile } from "deno";
*
- * const encoder = new TextEncoder("utf-8");
- * const data = encoder.encode("Hello world\n");
- * await writeFile("hello.txt", data);
+ * const encoder = new TextEncoder("utf-8");
+ * const data = encoder.encode("Hello world\n");
+ * await writeFile("hello.txt", data);
*/
export async function writeFile(
filename: string,