File tree Expand file tree Collapse file tree 1 file changed +5
-9
lines changed
extensions/ql-vscode/src/common/vscode Expand file tree Collapse file tree 1 file changed +5
-9
lines changed Original file line number Diff line number Diff line change @@ -18,15 +18,11 @@ class WatcherCollection extends DisposableObject {
1818 * deleted.
1919 * @param thisArgs The `this` argument for the event listener.
2020 */
21- public addWatcher (
22- pattern : GlobPattern ,
23- listener : ( e : Uri ) => any ,
24- thisArgs : any ,
25- ) : void {
21+ public addWatcher ( pattern : GlobPattern , listener : ( e : Uri ) => void ) : void {
2622 const watcher = workspace . createFileSystemWatcher ( pattern ) ;
27- this . push ( watcher . onDidCreate ( listener , thisArgs ) ) ;
28- this . push ( watcher . onDidChange ( listener , thisArgs ) ) ;
29- this . push ( watcher . onDidDelete ( listener , thisArgs ) ) ;
23+ this . push ( watcher . onDidCreate ( listener ) ) ;
24+ this . push ( watcher . onDidChange ( listener ) ) ;
25+ this . push ( watcher . onDidDelete ( listener ) ) ;
3026 }
3127}
3228
@@ -54,7 +50,7 @@ export class MultiFileSystemWatcher extends DisposableObject {
5450 * @param pattern The pattern to watch.
5551 */
5652 public addWatch ( pattern : GlobPattern ) : void {
57- this . watchers . addWatcher ( pattern , this . handleDidChange , this ) ;
53+ this . watchers . addWatcher ( pattern , this . handleDidChange . bind ( this ) ) ;
5854 }
5955
6056 /**
You can’t perform that action at this time.
0 commit comments