[improvement] organize type definitions

This commit is contained in:
陈嘉涵
2019-05-13 19:07:04 +08:00
parent 96b1d8f81d
commit 7755b1738e
40 changed files with 111 additions and 121 deletions

View File

@@ -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;
}