fix(router): update type castings for JSON.parse usage (#40710)

Update usages of JSON.parse to be cast as specific types.

PR Close #40710
This commit is contained in:
Joey Perrott 2021-02-04 14:16:34 -08:00 committed by Alex Rickabaugh
parent 4f7ff96e50
commit 350dadab73
1 changed files with 2 additions and 2 deletions

View File

@ -97,6 +97,6 @@ function createTransition(...resolvers: {[key: string]: string}[]) {
};
}
function deepClone(obj: any) {
return JSON.parse(JSON.stringify(obj));
function deepClone<T>(obj: T): T {
return JSON.parse(JSON.stringify(obj)) as T;
}