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:
Peter van der Zee 2018-02-15 09:42:23 -08:00 committed by Facebook Github Bot
parent 581623ed11
commit 5b383fce16
1 changed files with 6 additions and 11 deletions

View File

@ -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;