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
@@ -28,7 +28,7 @@ export class Buildifier extends Formatter {
|
||||
commandFlags: `${BAZEL_WARNING_FLAG} --lint=warn --mode=check --format=json`,
|
||||
callback:
|
||||
(_: string, code: number, stdout: string) => {
|
||||
return code !== 0 || !JSON.parse(stdout)['success'];
|
||||
return code !== 0 || !(JSON.parse(stdout) as {success: string}).success;
|
||||
},
|
||||
},
|
||||
format: {
|
||||
|
||||
Reference in New Issue
Block a user