mirror of https://github.com/status-im/metro.git
Cleanup lint errors
Summary: Argument was no longer used and is causing lint errors. Dropping it simplifies the debounce function as well. Reviewed By: davidaurelio Differential Revision: D6999567 fbshipit-source-id: 8856ed40feb0fa23155c9d18e20c43550aac876b
This commit is contained in:
parent
581623ed11
commit
5b383fce16
|
@ -52,16 +52,10 @@ const {
|
||||||
} = require('metro-core');
|
} = require('metro-core');
|
||||||
|
|
||||||
function debounceAndBatch(fn, delay) {
|
function debounceAndBatch(fn, delay) {
|
||||||
let args = [];
|
|
||||||
let timeout;
|
let timeout;
|
||||||
return value => {
|
return () => {
|
||||||
args.push(value);
|
|
||||||
clearTimeout(timeout);
|
clearTimeout(timeout);
|
||||||
timeout = setTimeout(() => {
|
timeout = setTimeout(fn, delay);
|
||||||
const a = args;
|
|
||||||
args = [];
|
|
||||||
fn(a);
|
|
||||||
}, delay);
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -183,9 +177,10 @@ class Server {
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
this._debouncedFileChangeHandler = debounceAndBatch(filePaths => {
|
this._debouncedFileChangeHandler = debounceAndBatch(
|
||||||
this._informChangeWatchers();
|
() => this._informChangeWatchers(),
|
||||||
}, 50);
|
50,
|
||||||
|
);
|
||||||
|
|
||||||
this._symbolicateInWorker = symbolicate.createWorker();
|
this._symbolicateInWorker = symbolicate.createWorker();
|
||||||
this._nextBundleBuildID = 1;
|
this._nextBundleBuildID = 1;
|
||||||
|
|
Loading…
Reference in New Issue