Fix strict TypeScript checks for client

This commit is contained in:
nav
2026-04-09 04:38:03 +00:00
parent 7cdda2e335
commit 57b53fc122
4 changed files with 48 additions and 16 deletions

View File

@@ -181,7 +181,8 @@ function assertClientStateShape(
);
}
if (!Number.isInteger(candidate.updatedAt) || candidate.updatedAt < 0) {
const updatedAt = candidate.updatedAt;
if (typeof updatedAt !== "number" || !Number.isInteger(updatedAt) || updatedAt < 0) {
throw new YonexusClientStateCorruptionError(
`Client state file has invalid updatedAt value: ${filePath}`
);