@samitouri / QOSami-HFS / commits / 4131a6ed

better code: typing

Massimo Melina committed Jun 3, 2023 at 10:29 UTC 4131a6edce7000879d34dca74be59ec7ec6be8cb
2 files changed +2 -2
src/util-files.ts
+1 -1
@@ -93,7 +93,7 @@ export async function* dirStream(path: string, deep=0) {
93 if (!isDir && !dirent.isFile()) continue
94 path = String(path)
95 if (!skip?.includes(path))
96 - yield [path, isDir]
96 + yield [path, isDir] as [string, boolean]
97 }
98
99 async function getItemsToSkip(path: string) {
src/watchLoad.ts
+1 -1
@@ -29,7 +29,7 @@ export function watchLoad(path:string, parser:(data:any)=>void|Promise<void>, {
29
30 function install(first=false) {
31 try {
32 - watcher = watch(path, ()=> {
32 + watcher = watch(path, () => {
33 if (!saving)
34 debounced().then()
35 })