upgraded to angular 8

This commit is contained in:
lotte
2020-02-13 11:09:20 +01:00
parent 3bbd05f588
commit 04cb75e786
106 changed files with 1959 additions and 1417 deletions

View File

@@ -5,7 +5,7 @@ import { isEqual, isObject, transform } from 'lodash';
* Returns passed object without specified property
*/
export function deleteProperty(object: object, key: string): object {
const {[key]: deletedKey, ...otherKeys} = object;
const { [key]: deletedKey, ...otherKeys } = object as { [key: string]: any };
return otherKeys;
}
@@ -47,7 +47,7 @@ export function difference(object: object, base: object) {
const changes = (o, b) => {
return transform(o, (result, value, key) => {
if (!isEqual(value, b[key]) && isNotEmpty(value)) {
const resultValue = (isObject(value) && isObject(b[key])) ? changes(value, b[key]) : value;
const resultValue = (isObject(value) && isObject(b[key])) ? changes(value, b[key]) : value as object;
if (!hasOnlyEmptyProperties(resultValue)) {
result[key] = resultValue;
}