Skip to content

Commit 83537fa

Browse files
committed
expose more FS methods to ts
So I can use them in typescript project without syntax error.
1 parent 2d6fae8 commit 83537fa

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
node_modules
22
dist
33
/.nyc_output
4-
.DS_Store
4+
.DS_Store
5+
6+
# ide
7+
.idea/

src/index.d.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ export const FS: {
22
writeFile: (fileName: string, binaryData: Uint8Array) => void,
33
readFile: (fileName: string) => Uint8Array,
44
unlink: (fileName: string) => void,
5+
mkdir: (fileName: string) => void,
6+
readdir: (fileName: string) => string[],
57
}
68

79
type FSMethodNames = { [K in keyof typeof FS]: (typeof FS)[K] extends (...args: any[]) => any ? K : never }[keyof typeof FS];

0 commit comments

Comments
 (0)