Bump typescript, @typescript-eslint/eslint-plugin, and @typescript-eslint/parser (#6143)

This commit is contained in:
Sebastian Malton authored and GitHub committed 2022-09-01 10:05:32 -04:00
1 parent 27871f57b6
commit b0d72b78d0
16 files changed
+105 -118

No files matched your search

+3 -1
View File
@@ -9,6 +9,7 @@ import type { Draft } from "immer";
import { produce, isDraft } from "immer";
import { isEqual, isPlainObject } from "lodash";
import logger from "../../main/logger";
import assert from "assert";
export interface StorageChange<T> {
key: string;
@@ -154,8 +155,9 @@ export class StorageHelper<T> implements StorageLayer<T> {
}
@action
merge(value: Partial<T> | ((draft: Draft<T>) => Partial<T> | void)) {
merge(value: T extends object ? Partial<T> | ((draft: Draft<T>) => Partial<T> | void) : never) {
const nextValue = produce<T>(toJS(this.get()), (draft) => {
assert(typeof draft === "object" && draft);
if (typeof value == "function") {
const newValue = value(draft);