Merge pull request #369 from Jeffxz/improve-ts

expose more FS methods to ts
This commit is contained in:
jeromewu
2022-08-14 18:37:06 +08:00
committed by GitHub
2 changed files with 6 additions and 1 deletions

2
src/index.d.ts vendored
View File

@@ -3,6 +3,8 @@ export const FS: {
readFile: (fileName: string) => Uint8Array,
readdir: (pathName: string) => string[],
unlink: (fileName: string) => void,
mkdir: (fileName: string) => void,
readdir: (fileName: string) => string[],
}
type FSMethodNames = { [K in keyof typeof FS]: (typeof FS)[K] extends (...args: any[]) => any ? K : never }[keyof typeof FS];