From 6f29d7986261b3113429f3a2aed6ca5f78e507fe Mon Sep 17 00:00:00 2001 From: "Zheng (Jeff) Xu" Date: Wed, 20 Jul 2022 07:44:25 -0400 Subject: [PATCH] expose more FS methods to ts So I can use them in typescript project without syntax error. --- .gitignore | 5 ++++- src/index.d.ts | 2 ++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 064213f..87ebeb4 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,7 @@ node_modules dist /.nyc_output -.DS_Store \ No newline at end of file +.DS_Store + +# ide +.idea/ diff --git a/src/index.d.ts b/src/index.d.ts index 5d0b749..c7af358 100644 --- a/src/index.d.ts +++ b/src/index.d.ts @@ -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];