mirror of
https://github.com/youzan/vant.git
synced 2025-10-19 18:14:13 +00:00
[improvement] organize type definitions
This commit is contained in:
@@ -4,8 +4,10 @@ export function deepClone(obj: object): object {
|
||||
if (Array.isArray(obj)) {
|
||||
return obj.map(item => deepClone(item));
|
||||
}
|
||||
|
||||
if (typeof obj === 'object') {
|
||||
return deepAssign({}, obj);
|
||||
}
|
||||
|
||||
return obj;
|
||||
}
|
||||
|
Reference in New Issue
Block a user