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:
committed by
Facebook GitHub Bot
parent
1a6e0ef42e
commit
73862c9408
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user