mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Bump typescript, @typescript-eslint/eslint-plugin, and @typescript-eslint/parser (#6143)
This commit is contained in:
1 parent
27871f57b6
commit
b0d72b78d0
16 files changed
+105
-118
No files matched your search
@@ -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);
|
||||
|
||||
Reference in new issue
Block a user