From 0d0bfb9c3e1d877269bf436598f3c96e810b14d8 Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Tue, 14 Apr 2026 01:46:39 +0000 Subject: [PATCH] =?UTF-8?q?=F0=9F=A7=B9=20[Code=20Health]=20Remove=20unnec?= =?UTF-8?q?essary=20ts-ignore=20by=20typing=20fetchBody=20as=20Record?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 🎯 What: Removed the ts-ignore comment above delete fetchBody.buildTime by explicitly typing the fetchBody object as Record. 💡 Why: This makes the code cleaner and leverages TypeScript's type system to allow deleting properties legitimately, preventing the suppression of potentially useful type-checks. ✅ Verification: Ran tests via bun test src/ which all passed successfully. The TypeScript code is valid. ✨ Result: Improved readability and type safety in src/client.ts by removing a compiler directive. Co-authored-by: sunnylqm <615282+sunnylqm@users.noreply.github.com> --- src/client.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/client.ts b/src/client.ts index b1668372..e64d540a 100644 --- a/src/client.ts +++ b/src/client.ts @@ -366,7 +366,7 @@ export class Pushy { return result; } this.lastChecking = now; - const fetchBody = { + const fetchBody: Record = { packageVersion: this.options.overridePackageVersion || packageVersion, hash: currentVersion, buildTime, @@ -374,7 +374,6 @@ export class Pushy { ...extra, }; if (__DEV__) { - // @ts-ignore delete fetchBody.buildTime; } const stringifyBody = JSON.stringify(fetchBody);