fix(compiler): 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-09 10:48:43 -08:00
committed by Alex Rickabaugh
parent b75d7cb11f
commit f728490222
5 changed files with 14 additions and 13 deletions
@@ -461,7 +461,7 @@ class FromJsonDeserializer extends ValueTransformer {
summaries: Summary<StaticSymbol>[],
importAs: {symbol: StaticSymbol, importAs: StaticSymbol}[]
} {
const data: {moduleName: string|null, summaries: any[], symbols: any[]} = JSON.parse(json);
const data = JSON.parse(json) as {moduleName: string | null, summaries: any[], symbols: any[]};
const allImportAs: {symbol: StaticSymbol, importAs: StaticSymbol}[] = [];
this.symbols = data.symbols.map(
(serializedSymbol) => this.symbolCache.get(