summaryrefslogtreecommitdiff
path: root/js/truncate.ts
diff options
context:
space:
mode:
Diffstat (limited to 'js/truncate.ts')
-rw-r--r--js/truncate.ts17
1 files changed, 8 insertions, 9 deletions
diff --git a/js/truncate.ts b/js/truncate.ts
index ed105ae28..c26eb8a74 100644
--- a/js/truncate.ts
+++ b/js/truncate.ts
@@ -3,25 +3,24 @@ import * as msg from "gen/msg_generated";
import { flatbuffers } from "flatbuffers";
import * as dispatch from "./dispatch";
-/**
- * Truncates or extends the specified file synchronously,
- * updating the size of this file to become size.
+/** Truncates or extends the specified file synchronously, updating the size of
+ * this file to become size.
*
- * import { truncateSync } from "deno";
+ * import { truncateSync } from "deno";
*
- * truncateSync("hello.txt", 10);
+ * truncateSync("hello.txt", 10);
*/
export function truncateSync(name: string, len?: number): void {
dispatch.sendSync(...req(name, len));
}
/**
- * Truncates or extends the specified file,
- * updating the size of this file to become size.
+ * Truncates or extends the specified file, updating the size of this file to
+ * become size.
*
- * import { truncate } from "deno";
+ * import { truncate } from "deno";
*
- * await truncate("hello.txt", 10);
+ * await truncate("hello.txt", 10);
*/
export async function truncate(name: string, len?: number): Promise<void> {
await dispatch.sendAsync(...req(name, len));