feat: continue Priority 2 return type annotations
🚀 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
This commit is contained in:
@@ -341,11 +341,11 @@ class StaleDataManager {
|
||||
|
||||
// Global functions for web
|
||||
if (typeof window !== 'undefined') {
|
||||
(window as Record<string, unknown>).refreshData = () => {
|
||||
(window as Record<string, unknown>).refreshData = (): void => {
|
||||
// Refreshing data from web banner (example implementation)
|
||||
};
|
||||
|
||||
(window as Record<string, unknown>).openSettings = () => {
|
||||
(window as Record<string, unknown>).openSettings = (): void => {
|
||||
// Opening settings from web banner (example implementation)
|
||||
};
|
||||
}
|
||||
|
||||
@@ -89,7 +89,7 @@ class ConfigLoader {
|
||||
}
|
||||
|
||||
// Phase 4: Enhanced configuration methods
|
||||
getEndorserAPIConfig() {
|
||||
getEndorserAPIConfig(): Record<string, unknown> {
|
||||
return {
|
||||
baseUrl: this.config.endorser.baseUrl.replace('/api/v2/report', ''),
|
||||
timeoutMs: this.config.endorser.timeoutMs,
|
||||
|
||||
@@ -326,7 +326,7 @@ export class ConfigLoader {
|
||||
/**
|
||||
* Get test data
|
||||
*/
|
||||
public getTestData() {
|
||||
public getTestData(): Record<string, unknown> {
|
||||
const config = this.getConfig();
|
||||
return config.testData;
|
||||
}
|
||||
|
||||
@@ -239,7 +239,7 @@ export const TestAPIExamples = {
|
||||
/**
|
||||
* Basic content fetching example
|
||||
*/
|
||||
async basicFetch() {
|
||||
async basicFetch(): Promise<void> {
|
||||
const client = new TestAPIClient(getAPIConfig());
|
||||
|
||||
console.log('Testing basic content fetch...');
|
||||
|
||||
@@ -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();
|
||||
});
|
||||
Reference in New Issue
Block a user