summaryrefslogtreecommitdiff
path: root/js/read_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/read_file.ts
parent1840a1971317f5b8fc6e322b3a414b7f8a593c88 (diff)
Align JSDoc to style guide.
Diffstat (limited to 'js/read_file.ts')
-rw-r--r--js/read_file.ts22
1 files changed, 10 insertions, 12 deletions
diff --git a/js/read_file.ts b/js/read_file.ts
index 5aa99cc22..52495f427 100644
--- a/js/read_file.ts
+++ b/js/read_file.ts
@@ -4,25 +4,23 @@ import { flatbuffers } from "flatbuffers";
import { assert } from "./util";
import * as dispatch from "./dispatch";
-/**
- * Read the entire contents of a file synchronously.
+/** Read the entire contents of a file synchronously.
*
- * import { readFileSync } from "deno";
- * const decoder = new TextDecoder("utf-8");
- * const data = readFileSync("hello.txt");
- * console.log(decoder.decode(data));
+ * import { readFileSync } from "deno";
+ * const decoder = new TextDecoder("utf-8");
+ * const data = readFileSync("hello.txt");
+ * console.log(decoder.decode(data));
*/
export function readFileSync(filename: string): Uint8Array {
return res(dispatch.sendSync(...req(filename)));
}
-/**
- * Read the entire contents of a file.
+/** Read the entire contents of a file.
*
- * import { readFile } from "deno";
- * const decoder = new TextDecoder("utf-8");
- * const data = await readFile("hello.txt");
- * console.log(decoder.decode(data));
+ * import { readFile } from "deno";
+ * const decoder = new TextDecoder("utf-8");
+ * const data = await readFile("hello.txt");
+ * console.log(decoder.decode(data));
*/
export async function readFile(filename: string): Promise<Uint8Array> {
return res(await dispatch.sendAsync(...req(filename)));