Skip to content

Commit

Permalink
remove watcher parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
panaaj committed Oct 2, 2024
1 parent ae72a4a commit 46e834e
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down Expand Up @@ -249,8 +245,7 @@ module.exports = (app: ChartProviderApp): Plugin => {
}
}

const handleWatchEvent = (eventType: string, filename: string) => {
console.log('***', eventType, filename)
const handleWatchEvent = () => {
lastWatchEvent = Date.now()
}

Expand Down

0 comments on commit 46e834e

Please sign in to comment.