chore: fix lint issues
This commit is contained in:
@@ -14,7 +14,7 @@ function assignKey(to: ObjectIndex, from: ObjectIndex, key: string) {
|
||||
if (!hasOwnProperty.call(to, key) || !isObject(val)) {
|
||||
to[key] = val;
|
||||
} else {
|
||||
// eslint-disable-next-line @typescript-eslint/no-use-before-define
|
||||
// eslint-disable-next-line no-use-before-define
|
||||
to[key] = deepAssign(Object(to[key]), from[key]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { deepAssign } from './deep-assign';
|
||||
|
||||
export function deepClone(obj: object): object {
|
||||
export function deepClone(obj: Record<string, any>): Record<string, any> {
|
||||
if (Array.isArray(obj)) {
|
||||
return obj.map((item) => deepClone(item));
|
||||
}
|
||||
|
||||
+2
-1
@@ -4,12 +4,13 @@ export { createNamespace } from './create';
|
||||
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
||||
export function noop() {}
|
||||
|
||||
export const inBrowser = typeof window !== 'undefined'
|
||||
export const inBrowser = typeof window !== 'undefined';
|
||||
|
||||
export function isDef(val: unknown): boolean {
|
||||
return val !== undefined && val !== null;
|
||||
}
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/ban-types
|
||||
export function isFunction(val: unknown): val is Function {
|
||||
return typeof val === 'function';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user