refine typescript type of tryExecuteComand

Summary: You can now descriminate based on `hasProblem`. Thus removing asserting operator

Reviewed By: LukeDefeo

Differential Revision: D50366398

fbshipit-source-id: a16a5419ce946831bd2d1624b1baa75c89a47aa3
This commit is contained in:
Anton Kastritskiy
2023-10-17 16:01:08 -07:00
committed by Facebook GitHub Bot
parent 1a6e0ef42e
commit 73862c9408
2 changed files with 9 additions and 4 deletions

View File

@@ -69,9 +69,14 @@ export namespace FlipperDoctor {
message: string;
};
export type SubprocessHealtcheckRunResult = HealthcheckRunResult & {
stdout?: string;
};
export type SubprocessHealtcheckRunResult =
| (HealthcheckRunResult & {
hasProblem: true;
})
| (HealthcheckRunResult & {
hasProblem: false;
stdout: string;
});
export type CategoryResult = [
string,