Skip to content

Commit

Permalink
fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
amrbashir committed Nov 21, 2023
1 parent 5f7b297 commit fe05cc2
Showing 1 changed file with 17 additions and 17 deletions.
34 changes: 17 additions & 17 deletions plugins/fs/guest-js/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@ interface CreateOptions {
*/
async function create(
path: string | URL,
options?: CreateOptions
options?: CreateOptions,
): Promise<FsFile> {
if (path instanceof URL && path.protocol !== "file:") {
throw new TypeError("Must be a file URL.");
Expand Down Expand Up @@ -416,7 +416,7 @@ interface OpenOptions {
*/
async function open(
path: string | URL,
options?: OpenOptions
options?: OpenOptions,
): Promise<FsFile> {
if (path instanceof URL && path.protocol !== "file:") {
throw new TypeError("Must be a file URL.");
Expand Down Expand Up @@ -467,7 +467,7 @@ interface CopyFileOptions {
async function copyFile(
fromPath: string | URL,
toPath: string | URL,
options?: CopyFileOptions
options?: CopyFileOptions,
): Promise<void> {
if (
(fromPath instanceof URL && fromPath.protocol !== "file:") ||
Expand Down Expand Up @@ -504,7 +504,7 @@ interface MkdirOptions {
*/
async function mkdir(
path: string | URL,
options?: MkdirOptions
options?: MkdirOptions,
): Promise<void> {
if (path instanceof URL && path.protocol !== "file:") {
throw new TypeError("Must be a file URL.");
Expand Down Expand Up @@ -559,7 +559,7 @@ interface DirEntry {
*/
async function readDir(
path: string | URL,
options?: ReadDirOptions
options?: ReadDirOptions,
): Promise<DirEntry[]> {
if (path instanceof URL && path.protocol !== "file:") {
throw new TypeError("Must be a file URL.");
Expand Down Expand Up @@ -625,7 +625,7 @@ interface ReadFileOptions {
*/
async function readFile(
path: string | URL,
options?: ReadFileOptions
options?: ReadFileOptions,
): Promise<Uint8Array> {
if (path instanceof URL && path.protocol !== "file:") {
throw new TypeError("Must be a file URL.");
Expand All @@ -649,7 +649,7 @@ async function readFile(
*/
async function readTextFile(
path: string | URL,
options?: ReadFileOptions
options?: ReadFileOptions,
): Promise<string> {
if (path instanceof URL && path.protocol !== "file:") {
throw new TypeError("Must be a file URL.");
Expand All @@ -676,7 +676,7 @@ async function readTextFile(
*/
async function readTextFileLines(
path: string | URL,
options?: ReadFileOptions
options?: ReadFileOptions,
): Promise<AsyncIterableIterator<string>> {
if (path instanceof URL && path.protocol !== "file:") {
throw new TypeError("Must be a file URL.");
Expand All @@ -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
Expand Down Expand Up @@ -733,7 +733,7 @@ interface RemoveOptions {
*/
async function remove(
path: string | URL,
options?: RemoveOptions
options?: RemoveOptions,
): Promise<void> {
if (path instanceof URL && path.protocol !== "file:") {
throw new TypeError("Must be a file URL.");
Expand Down Expand Up @@ -768,7 +768,7 @@ interface RenameOptions {
async function rename(
oldPath: string | URL,
newPath: string | URL,
options: RenameOptions
options: RenameOptions,
): Promise<void> {
if (
(oldPath instanceof URL && oldPath.protocol !== "file:") ||
Expand Down Expand Up @@ -824,7 +824,7 @@ async function rename(
async function seek(
rid: number,
offset: number,
whence: SeekMode
whence: SeekMode,
): Promise<number> {
return invoke("plugin:fs|seek", {
rid,
Expand All @@ -851,7 +851,7 @@ interface StatOptions {
*/
async function stat(
path: string | URL,
options?: StatOptions
options?: StatOptions,
): Promise<FileInfo> {
const res = await invoke<UnparsedFileInfo>("plugin:fs|stat", {
path: path instanceof URL ? path.toString() : path,
Expand All @@ -875,7 +875,7 @@ async function stat(
*/
async function lstat(
path: string | URL,
options?: StatOptions
options?: StatOptions,
): Promise<FileInfo> {
const res = await invoke<UnparsedFileInfo>("plugin:fs|lstat", {
path: path instanceof URL ? path.toString() : path,
Expand Down Expand Up @@ -930,7 +930,7 @@ interface TruncateOptions {
async function truncate(
path: string | URL,
len?: number,
options?: TruncateOptions
options?: TruncateOptions,
): Promise<void> {
if (path instanceof URL && path.protocol !== "file:") {
throw new TypeError("Must be a file URL.");
Expand Down Expand Up @@ -1026,7 +1026,7 @@ interface WriteFileOptions {
async function writeFile(
path: string | URL,
data: Uint8Array,
options?: WriteFileOptions
options?: WriteFileOptions,
): Promise<void> {
if (path instanceof URL && path.protocol !== "file:") {
throw new TypeError("Must be a file URL.");
Expand All @@ -1051,7 +1051,7 @@ async function writeFile(
async function writeTextFile(
path: string | URL,
data: string,
options?: WriteFileOptions
options?: WriteFileOptions,
): Promise<void> {
if (path instanceof URL && path.protocol !== "file:") {
throw new TypeError("Must be a file URL.");
Expand Down

0 comments on commit fe05cc2

Please sign in to comment.