mirror of
https://github.com/denoland/deno.git
synced 2025-09-27 20:59:10 +00:00
Remove doc strings from cli/js TS files (#4329)
Co-authored-by: Ryan Dahl <ry@tinyclouds.org>
This commit is contained in:
parent
3ac642c183
commit
e435c2be15
87 changed files with 0 additions and 2025 deletions
|
@ -13,21 +13,10 @@ function coerceLen(len?: number): number {
|
|||
return len;
|
||||
}
|
||||
|
||||
/** Synchronously truncates or extends the specified file, to reach the
|
||||
* specified `len`.
|
||||
*
|
||||
* Deno.truncateSync("hello.txt", 10);
|
||||
*
|
||||
* Requires `allow-write` permission. */
|
||||
export function truncateSync(path: string, len?: number): void {
|
||||
sendSync("op_truncate", { path, len: coerceLen(len) });
|
||||
}
|
||||
|
||||
/** Truncates or extends the specified file, to reach the specified `len`.
|
||||
*
|
||||
* await Deno.truncate("hello.txt", 10);
|
||||
*
|
||||
* Requires `allow-write` permission. */
|
||||
export async function truncate(path: string, len?: number): Promise<void> {
|
||||
await sendAsync("op_truncate", { path, len: coerceLen(len) });
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue