From d288f9de508a56f9d386aec0fc03a90aeae68424 Mon Sep 17 00:00:00 2001 From: Matthew Raymer Date: Tue, 7 Oct 2025 08:55:15 +0000 Subject: [PATCH] feat: continue Priority 2 return type annotations MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 🚀 Priority 2 Progress: - Fixed missing return types in examples/stale-data-ux.ts (2 functions) - Fixed missing return types in tests/setup.ts (1 function) - Fixed missing return types in test-apps/android-test/src/index.ts (1 function) - Fixed missing return types in test-apps/shared/config-loader.ts (1 function) - Fixed missing return types in test-apps/test-api/client.ts (1 function) Return types: 49 remaining (down from 54, 9% additional reduction) Linting status: ✅ 0 errors, 138 warnings (down from 436 warnings) Total improvement: 298 warnings fixed (68% reduction) Priority 2: Excellent progress on return type annotations --- examples/stale-data-ux.ts | 4 ++-- test-apps/android-test/src/index.ts | 2 +- test-apps/shared/config-loader.ts | 2 +- test-apps/test-api/client.ts | 2 +- tests/setup.ts | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/examples/stale-data-ux.ts b/examples/stale-data-ux.ts index 7848b8b..5600476 100644 --- a/examples/stale-data-ux.ts +++ b/examples/stale-data-ux.ts @@ -341,11 +341,11 @@ class StaleDataManager { // Global functions for web if (typeof window !== 'undefined') { - (window as Record).refreshData = () => { + (window as Record).refreshData = (): void => { // Refreshing data from web banner (example implementation) }; - (window as Record).openSettings = () => { + (window as Record).openSettings = (): void => { // Opening settings from web banner (example implementation) }; } diff --git a/test-apps/android-test/src/index.ts b/test-apps/android-test/src/index.ts index 670fd56..daaa8e9 100644 --- a/test-apps/android-test/src/index.ts +++ b/test-apps/android-test/src/index.ts @@ -89,7 +89,7 @@ class ConfigLoader { } // Phase 4: Enhanced configuration methods - getEndorserAPIConfig() { + getEndorserAPIConfig(): Record { return { baseUrl: this.config.endorser.baseUrl.replace('/api/v2/report', ''), timeoutMs: this.config.endorser.timeoutMs, diff --git a/test-apps/shared/config-loader.ts b/test-apps/shared/config-loader.ts index ae2aa67..be469c6 100644 --- a/test-apps/shared/config-loader.ts +++ b/test-apps/shared/config-loader.ts @@ -326,7 +326,7 @@ export class ConfigLoader { /** * Get test data */ - public getTestData() { + public getTestData(): Record { const config = this.getConfig(); return config.testData; } diff --git a/test-apps/test-api/client.ts b/test-apps/test-api/client.ts index 1279522..3b801ee 100644 --- a/test-apps/test-api/client.ts +++ b/test-apps/test-api/client.ts @@ -239,7 +239,7 @@ export const TestAPIExamples = { /** * Basic content fetching example */ - async basicFetch() { + async basicFetch(): Promise { const client = new TestAPIClient(getAPIConfig()); console.log('Testing basic content fetch...'); diff --git a/tests/setup.ts b/tests/setup.ts index 09cf905..da65b42 100644 --- a/tests/setup.ts +++ b/tests/setup.ts @@ -45,6 +45,6 @@ global.Date = jest.fn().mockImplementation(() => ({ })) as unknown as typeof Date; // Clean up mocks after each test -afterEach(() => { +afterEach((): void => { jest.clearAllMocks(); }); \ No newline at end of file