Fix reading files from WebAssembly (#4183)

This commit is contained in:
Jonathan Tran
2024-10-18 10:43:01 -04:00
committed by GitHub
parent 5332ddd88e
commit 19ffa220e8
8 changed files with 115 additions and 9 deletions

2
interface.d.ts vendored
View File

@ -23,8 +23,8 @@ export interface IElectronAPI {
key: string,
callback: (eventType: string, path: string) => void
) => void
readFile: typeof fs.readFile
watchFileOff: (path: string, key: string) => void
readFile: (path: string) => ReturnType<fs.readFile>
writeFile: (
path: string,
data: string | Uint8Array