expose more FS methods to ts
So I can use them in typescript project without syntax error.
This commit is contained in:
parent
fcc312abd3
commit
6f29d79862
3
.gitignore
vendored
3
.gitignore
vendored
@ -2,3 +2,6 @@ node_modules
|
||||
dist
|
||||
/.nyc_output
|
||||
.DS_Store
|
||||
|
||||
# ide
|
||||
.idea/
|
||||
|
2
src/index.d.ts
vendored
2
src/index.d.ts
vendored
@ -2,6 +2,8 @@ export const FS: {
|
||||
writeFile: (fileName: string, binaryData: Uint8Array) => void,
|
||||
readFile: (fileName: string) => Uint8Array,
|
||||
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];
|
||||
|
Loading…
Reference in New Issue
Block a user