chore: upgrade to eslint v8 (#38472)

chore: upgrade to eslint@8
This commit is contained in:
Milan Burda 2023-05-30 13:10:22 +02:00 committed by GitHub
parent a6f7c7690d
commit 71fb19ea14
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 288 additions and 715 deletions

View file

@ -19,14 +19,14 @@ export class IpcMainImpl extends EventEmitter {
throw new Error(`Expected handler to be a function, but found type '${typeof fn}'`);
}
this._invokeHandlers.set(method, fn);
}
};
handleOnce: Electron.IpcMain['handleOnce'] = (method, fn) => {
this.handle(method, (e, ...args) => {
this.removeHandler(method);
return fn(e, ...args);
});
}
};
removeHandler (method: string) {
this._invokeHandlers.delete(method);