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');
|
||||
|
||||
function debounceAndBatch(fn, delay) {
|
||||
let args = [];
|
||||
let timeout;
|
||||
return value => {
|
||||
args.push(value);
|
||||
return () => {
|
||||
clearTimeout(timeout);
|
||||
timeout = setTimeout(() => {
|
||||
const a = args;
|
||||
args = [];
|
||||
fn(a);
|
||||
}, delay);
|
||||
timeout = setTimeout(fn, delay);
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -183,9 +177,10 @@ class Server {
|
|||
);
|
||||
});
|
||||
|
||||
this._debouncedFileChangeHandler = debounceAndBatch(filePaths => {
|
||||
this._informChangeWatchers();
|
||||
}, 50);
|
||||
this._debouncedFileChangeHandler = debounceAndBatch(
|
||||
() => this._informChangeWatchers(),
|
||||
50,
|
||||
);
|
||||
|
||||
this._symbolicateInWorker = symbolicate.createWorker();
|
||||
this._nextBundleBuildID = 1;
|
||||
|
|
Loading…
Reference in New Issue