From 587a7a033625a616fc1cbd86f15ea5698ed81f02 Mon Sep 17 00:00:00 2001 From: v1rtl Date: Fri, 20 Sep 2024 09:03:51 +0000 Subject: [PATCH] fmt --- src/index.ts | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/src/index.ts b/src/index.ts index ee1670a9..70515e31 100644 --- a/src/index.ts +++ b/src/index.ts @@ -43,7 +43,7 @@ export type Throttler = { timeoutObject: any; clear: () => void; count: number; -} +}; export type ChokidarOptions = Partial< BasicOpts & { @@ -690,13 +690,7 @@ export class FSWatcher extends EventEmitter { * @param timeout duration of time to suppress duplicate actions * @returns tracking object or false if action should be suppressed */ - _throttle( - actionType: ThrottleType, - path: Path, - timeout: number - ): - | Throttler - | false { + _throttle(actionType: ThrottleType, path: Path, timeout: number): Throttler | false { if (!this._throttled.has(actionType)) { this._throttled.set(actionType, new Map()); } @@ -738,7 +732,12 @@ export class FSWatcher extends EventEmitter { * @param event * @param awfEmit Callback to be called when ready for event to be emitted. */ - _awaitWriteFinish(path: Path, threshold: number, event: EventName, awfEmit: (err?: Error, stat?: Stats) => void) { + _awaitWriteFinish( + path: Path, + threshold: number, + event: EventName, + awfEmit: (err?: Error, stat?: Stats) => void + ) { const awf = this.options.awaitWriteFinish; if (typeof awf !== 'object') return; const pollInterval = awf.pollInterval as unknown as number;