Make FS methods synchronous to mirror emscripten's

This commit is contained in:
Sxxov 2021-01-13 16:37:59 +08:00
parent 9c35d2bea9
commit 52bd53d61a

6
src/index.d.ts vendored
View File

@ -1,7 +1,7 @@
export const FS: { export const FS: {
writeFile: (fileName: string, binaryData: Uint8Array) => Promise<void>, writeFile: (fileName: string, binaryData: Uint8Array) => void,
readFile: (fileName: string) => Promise<Uint8Array>, readFile: (fileName: string) => void,
unlink: (fileName: string) => Promise<void>, unlink: (fileName: string) => void,
} }
type FSMethodNames = { [K in keyof typeof FS]: (typeof FS)[K] extends (...args: any[]) => any ? K : never }[keyof typeof FS]; type FSMethodNames = { [K in keyof typeof FS]: (typeof FS)[K] extends (...args: any[]) => any ? K : never }[keyof typeof FS];