Skip to content

Commit 350dada

Browse files
josephperrottalxhub
authored andcommitted
fix(router): update type castings for JSON.parse usage (#40710)
Update usages of JSON.parse to be cast as specific types. PR Close #40710
1 parent 4f7ff96 commit 350dada

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/router/test/operators/resolve_data.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,6 @@ function createTransition(...resolvers: {[key: string]: string}[]) {
9797
};
9898
}
9999

100-
function deepClone(obj: any) {
101-
return JSON.parse(JSON.stringify(obj));
100+
function deepClone<T>(obj: T): T {
101+
return JSON.parse(JSON.stringify(obj)) as T;
102102
}

0 commit comments

Comments
 (0)