Lint
This commit is contained in:
parent
0736047487
commit
7bb7765c84
2 changed files with 9 additions and 5 deletions
|
|
@ -143,7 +143,9 @@ async function main(): Promise<void> {
|
|||
writeHealthStatus(healthFile, status);
|
||||
});
|
||||
}, 30 * 1000); // every 30 seconds
|
||||
const clearHealthInterval = () => clearInterval(healthInterval);
|
||||
const clearHealthInterval = (): void => {
|
||||
clearInterval(healthInterval);
|
||||
};
|
||||
process.on("SIGINT", clearHealthInterval);
|
||||
process.on("SIGTERM", clearHealthInterval);
|
||||
process.on("exit", clearHealthInterval);
|
||||
|
|
|
|||
|
|
@ -13,11 +13,13 @@ function isHealthStatus(value: unknown): value is NetworkConnectionStatus {
|
|||
return false;
|
||||
}
|
||||
|
||||
const obj = value as Record<string, unknown>;
|
||||
return (
|
||||
typeof obj.isSuccessful === "boolean" &&
|
||||
typeof obj.isWebSocketConnected === "boolean" &&
|
||||
typeof obj.serverMessage === "string"
|
||||
"isSuccessful" in value &&
|
||||
typeof value.isSuccessful === "boolean" &&
|
||||
"isWebSocketConnected" in value &&
|
||||
typeof value.isWebSocketConnected === "boolean" &&
|
||||
"serverMessage" in value &&
|
||||
typeof value.serverMessage === "string"
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue