diff --git a/plugins/fs/guest-js/index.ts b/plugins/fs/guest-js/index.ts index 1c269b5ef..ca7a14ed6 100644 --- a/plugins/fs/guest-js/index.ts +++ b/plugins/fs/guest-js/index.ts @@ -336,7 +336,7 @@ interface CreateOptions { */ async function create( path: string | URL, - options?: CreateOptions + options?: CreateOptions, ): Promise { if (path instanceof URL && path.protocol !== "file:") { throw new TypeError("Must be a file URL."); @@ -416,7 +416,7 @@ interface OpenOptions { */ async function open( path: string | URL, - options?: OpenOptions + options?: OpenOptions, ): Promise { if (path instanceof URL && path.protocol !== "file:") { throw new TypeError("Must be a file URL."); @@ -467,7 +467,7 @@ interface CopyFileOptions { async function copyFile( fromPath: string | URL, toPath: string | URL, - options?: CopyFileOptions + options?: CopyFileOptions, ): Promise { if ( (fromPath instanceof URL && fromPath.protocol !== "file:") || @@ -504,7 +504,7 @@ interface MkdirOptions { */ async function mkdir( path: string | URL, - options?: MkdirOptions + options?: MkdirOptions, ): Promise { if (path instanceof URL && path.protocol !== "file:") { throw new TypeError("Must be a file URL."); @@ -559,7 +559,7 @@ interface DirEntry { */ async function readDir( path: string | URL, - options?: ReadDirOptions + options?: ReadDirOptions, ): Promise { if (path instanceof URL && path.protocol !== "file:") { throw new TypeError("Must be a file URL."); @@ -625,7 +625,7 @@ interface ReadFileOptions { */ async function readFile( path: string | URL, - options?: ReadFileOptions + options?: ReadFileOptions, ): Promise { if (path instanceof URL && path.protocol !== "file:") { throw new TypeError("Must be a file URL."); @@ -649,7 +649,7 @@ async function readFile( */ async function readTextFile( path: string | URL, - options?: ReadFileOptions + options?: ReadFileOptions, ): Promise { if (path instanceof URL && path.protocol !== "file:") { throw new TypeError("Must be a file URL."); @@ -676,7 +676,7 @@ async function readTextFile( */ async function readTextFileLines( path: string | URL, - options?: ReadFileOptions + options?: ReadFileOptions, ): Promise> { if (path instanceof URL && path.protocol !== "file:") { throw new TypeError("Must be a file URL."); @@ -697,7 +697,7 @@ async function readTextFileLines( const [line, done] = await invoke<[string | null, boolean]>( "plugin:fs|read_text_file_lines_next", - { rid: this.rid } + { rid: this.rid }, ); // an iteration is over, reset rid for next iteration @@ -733,7 +733,7 @@ interface RemoveOptions { */ async function remove( path: string | URL, - options?: RemoveOptions + options?: RemoveOptions, ): Promise { if (path instanceof URL && path.protocol !== "file:") { throw new TypeError("Must be a file URL."); @@ -768,7 +768,7 @@ interface RenameOptions { async function rename( oldPath: string | URL, newPath: string | URL, - options: RenameOptions + options: RenameOptions, ): Promise { if ( (oldPath instanceof URL && oldPath.protocol !== "file:") || @@ -824,7 +824,7 @@ async function rename( async function seek( rid: number, offset: number, - whence: SeekMode + whence: SeekMode, ): Promise { return invoke("plugin:fs|seek", { rid, @@ -851,7 +851,7 @@ interface StatOptions { */ async function stat( path: string | URL, - options?: StatOptions + options?: StatOptions, ): Promise { const res = await invoke("plugin:fs|stat", { path: path instanceof URL ? path.toString() : path, @@ -875,7 +875,7 @@ async function stat( */ async function lstat( path: string | URL, - options?: StatOptions + options?: StatOptions, ): Promise { const res = await invoke("plugin:fs|lstat", { path: path instanceof URL ? path.toString() : path, @@ -930,7 +930,7 @@ interface TruncateOptions { async function truncate( path: string | URL, len?: number, - options?: TruncateOptions + options?: TruncateOptions, ): Promise { if (path instanceof URL && path.protocol !== "file:") { throw new TypeError("Must be a file URL."); @@ -1026,7 +1026,7 @@ interface WriteFileOptions { async function writeFile( path: string | URL, data: Uint8Array, - options?: WriteFileOptions + options?: WriteFileOptions, ): Promise { if (path instanceof URL && path.protocol !== "file:") { throw new TypeError("Must be a file URL."); @@ -1051,7 +1051,7 @@ async function writeFile( async function writeTextFile( path: string | URL, data: string, - options?: WriteFileOptions + options?: WriteFileOptions, ): Promise { if (path instanceof URL && path.protocol !== "file:") { throw new TypeError("Must be a file URL.");