From 766262ca1a1b4dfc0af18a6fb4e5de226e6153e9 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Fri, 24 Oct 2025 23:14:01 -0500 Subject: [PATCH] Fix ElectronFSAdapter types --- src/lib/ElectronFSAdapter.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lib/ElectronFSAdapter.ts b/src/lib/ElectronFSAdapter.ts index bbfc3ae4..33c35f74 100644 --- a/src/lib/ElectronFSAdapter.ts +++ b/src/lib/ElectronFSAdapter.ts @@ -49,13 +49,13 @@ export class ElectronFSAdapter implements JSRuntimeFS { return error; } - async readFile(path: string): Promise; + async readFile(path: string): Promise>; async readFile(path: string, options: 'utf8'): Promise; async readFile(path: string, options: string): Promise; async readFile(path: string, options: { encoding: 'utf8' }): Promise; async readFile(path: string, options: { encoding: string }): Promise; - async readFile(path: string, options?: string | { encoding?: string }): Promise; - async readFile(path: string, options?: string | { encoding?: string }): Promise { + async readFile(path: string, options?: string | { encoding?: string }): Promise>; + async readFile(path: string, options?: string | { encoding?: string }): Promise> { try { const encoding = typeof options === 'string' ? options : options?.encoding; const result = await this.electron.fs.readFile(path, encoding);