fix(dev-infra): 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:
committed by
Alex Rickabaugh
parent
2c90391d4b
commit
cbdb5e208e
@@ -86,7 +86,8 @@ export function discoverAllEntrypoints(dirPath: string) {
|
||||
|
||||
// Get all typings file locations from package.json files
|
||||
for (const packageJson of packageJsons) {
|
||||
const packageJsonObj = JSON.parse(fs.readFileSync(packageJson, {encoding: 'utf8'})) as any;
|
||||
const packageJsonObj =
|
||||
JSON.parse(fs.readFileSync(packageJson, {encoding: 'utf8'})) as {typings: string};
|
||||
const typings = packageJsonObj.typings;
|
||||
if (typings) {
|
||||
entryPoints.push(path.join(path.dirname(packageJson), typings));
|
||||
|
||||
Reference in New Issue
Block a user