From 46e834e824ee7af8ab74e7cc5f5c9de2811e15aa Mon Sep 17 00:00:00 2001 From: panaaj <38519157+panaaj@users.noreply.github.com> Date: Wed, 2 Oct 2024 16:07:34 +0930 Subject: [PATCH] remove watcher parameters --- src/index.ts | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/index.ts b/src/index.ts index c8ddd3a..1aa9556 100644 --- a/src/index.ts +++ b/src/index.ts @@ -197,11 +197,7 @@ module.exports = (app: ChartProviderApp): Plugin => { chartPaths.forEach((p) => { console.log('watching..', p) - watchers.push( - fs.watch(p, 'utf8', (eventType, filename) => - handleWatchEvent(eventType, filename) - ) - ) + watchers.push(fs.watch(p, 'utf8', () => handleWatchEvent())) }) app.debug( @@ -249,8 +245,7 @@ module.exports = (app: ChartProviderApp): Plugin => { } } - const handleWatchEvent = (eventType: string, filename: string) => { - console.log('***', eventType, filename) + const handleWatchEvent = () => { lastWatchEvent = Date.now() }