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);