Skip to content

Commit

Permalink
fix type check
Browse files Browse the repository at this point in the history
  • Loading branch information
Bamieh committed Sep 14, 2020
1 parent 2835ed8 commit 95684b1
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/kbn-telemetry-tools/src/tools/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -241,8 +241,9 @@ export const flattenKeys = (obj: any, keyPath: any[] = []): any => {
return { [keyPath.join('.')]: obj };
};

type ObjectDict = Record<string, any>;
export function difference(actual: any, expected: any) {
function changes(obj: { [key: string]: any }, base: { [key: string]: any }) {
function changes(obj: ObjectDict, base: ObjectDict) {
return transform(
obj,
function (result, value, key) {
Expand Down Expand Up @@ -270,7 +271,7 @@ export function difference(actual: any, expected: any) {
result[key] = isObject(value) && isObject(base[key]) ? changes(value, base[key]) : value;
}
},
{}
{} as ObjectDict
);
}
return changes(actual, expected);
Expand Down

0 comments on commit 95684b1

Please sign in to comment.