fix(elements): 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:21:38 -08:00 committed by Alex Rickabaugh
parent 4b469c960e
commit efd4149e9e
1 changed files with 1 additions and 1 deletions

View File

@ -58,7 +58,7 @@ describe('Elements Schematics', () => {
const tree = const tree =
await schematicRunner.runSchematicAsync('ng-add', defaultOptions, appTree).toPromise(); await schematicRunner.runSchematicAsync('ng-add', defaultOptions, appTree).toPromise();
const pkgJsonText = tree.readContent('/package.json'); const pkgJsonText = tree.readContent('/package.json');
const pkgJson = JSON.parse(pkgJsonText); const pkgJson = JSON.parse(pkgJsonText) as {dependencies: any};
const {dependencies} = pkgJson; const {dependencies} = pkgJson;
expect(dependencies['document-register-element']).toBeDefined(); expect(dependencies['document-register-element']).toBeDefined();
}); });