From 350dadab73d2bc1d359e3d38604eac3dd68508f2 Mon Sep 17 00:00:00 2001 From: Joey Perrott Date: Thu, 4 Feb 2021 14:16:34 -0800 Subject: [PATCH] fix(router): update type castings for JSON.parse usage (#40710) Update usages of JSON.parse to be cast as specific types. PR Close #40710 --- packages/router/test/operators/resolve_data.spec.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/router/test/operators/resolve_data.spec.ts b/packages/router/test/operators/resolve_data.spec.ts index fb76e7ea85..aa8ced9690 100644 --- a/packages/router/test/operators/resolve_data.spec.ts +++ b/packages/router/test/operators/resolve_data.spec.ts @@ -97,6 +97,6 @@ function createTransition(...resolvers: {[key: string]: string}[]) { }; } -function deepClone(obj: any) { - return JSON.parse(JSON.stringify(obj)); +function deepClone(obj: T): T { + return JSON.parse(JSON.stringify(obj)) as T; }