feat: continue Priority 1 any type fixes
- Fix remaining any types in electron test app (9 types)
- Fix remaining any types in shared config loader (11 types)
- Fix remaining any types in core plugin files (4 types)
- Fix remaining any types in polling contracts (8 types)
- Enhanced type safety across all test apps and core modules
Linting status: ✅ 0 errors, 292 warnings (down from 436 warnings)
Priority 1 progress: 144 warnings fixed (33% reduction)
Any types remaining: 76 (down from 113, 37% reduction)
This commit is contained in:
@@ -71,8 +71,8 @@ export interface TimeSafariConfig {
|
||||
starredPlanIds: string[];
|
||||
lastKnownOfferId: string;
|
||||
lastKnownPlanId: string;
|
||||
mockOffers: any[];
|
||||
mockProjects: any[];
|
||||
mockOffers: Record<string, unknown>[];
|
||||
mockProjects: Record<string, unknown>[];
|
||||
};
|
||||
callbacks: {
|
||||
offers: {
|
||||
@@ -356,7 +356,7 @@ export class TestLogger {
|
||||
return levels.indexOf(level) <= levels.indexOf(this.logLevel);
|
||||
}
|
||||
|
||||
private addToLogs(level: string, message: string, _data?: any): void {
|
||||
private addToLogs(level: string, message: string, _data?: Record<string, unknown>): void {
|
||||
const timestamp = new Date().toISOString();
|
||||
const logEntry = `[${timestamp}] [${level.toUpperCase()}] ${message}`;
|
||||
this.logs.push(logEntry);
|
||||
@@ -367,28 +367,28 @@ export class TestLogger {
|
||||
}
|
||||
}
|
||||
|
||||
public debug(message: string, data?: any) {
|
||||
public debug(message: string, data?: Record<string, unknown>) {
|
||||
if (this.shouldLog('debug')) {
|
||||
console.log(`[DEBUG] ${message}`, data || '');
|
||||
this.addToLogs('debug', message, data);
|
||||
}
|
||||
}
|
||||
|
||||
public info(message: string, data?: any) {
|
||||
public info(message: string, data?: Record<string, unknown>) {
|
||||
if (this.shouldLog('info')) {
|
||||
console.log(`[INFO] ${message}`, data || '');
|
||||
this.addToLogs('info', message, data);
|
||||
}
|
||||
}
|
||||
|
||||
public warn(message: string, data?: any) {
|
||||
public warn(message: string, data?: Record<string, unknown>) {
|
||||
if (this.shouldLog('warn')) {
|
||||
console.warn(`[WARN] ${message}`, data || '');
|
||||
this.addToLogs('warn', message, data);
|
||||
}
|
||||
}
|
||||
|
||||
public error(message: string, data?: any) {
|
||||
public error(message: string, data?: Record<string, unknown>) {
|
||||
if (this.shouldLog('error')) {
|
||||
console.error(`[ERROR] ${message}`, data || '');
|
||||
this.addToLogs('error', message, data);
|
||||
@@ -433,7 +433,7 @@ export class MockDailyNotificationService {
|
||||
/**
|
||||
* Schedule dual notification (content fetch + user notification)
|
||||
*/
|
||||
public async scheduleDualNotification(config: any): Promise<void> {
|
||||
public async scheduleDualNotification(config: Record<string, unknown>): Promise<void> {
|
||||
if (!this.isInitialized) {
|
||||
throw new Error('Service not initialized');
|
||||
}
|
||||
@@ -465,7 +465,7 @@ export class MockDailyNotificationService {
|
||||
/**
|
||||
* Get dual schedule status
|
||||
*/
|
||||
public async getDualScheduleStatus(): Promise<any> {
|
||||
public async getDualScheduleStatus(): Promise<Record<string, unknown>> {
|
||||
return {
|
||||
contentFetch: {
|
||||
enabled: true,
|
||||
@@ -491,7 +491,7 @@ export class MockDailyNotificationService {
|
||||
/**
|
||||
* Simulate content fetch using Endorser.ch API patterns
|
||||
*/
|
||||
private async simulateContentFetch(config: any): Promise<void> {
|
||||
private async simulateContentFetch(config: Record<string, unknown>): Promise<void> {
|
||||
this.logger.info('Simulating content fetch from Endorser.ch API');
|
||||
|
||||
try {
|
||||
@@ -541,7 +541,7 @@ export class MockDailyNotificationService {
|
||||
/**
|
||||
* Simulate user notification
|
||||
*/
|
||||
private async simulateUserNotification(config: any): Promise<void> {
|
||||
private async simulateUserNotification(config: Record<string, unknown>): Promise<void> {
|
||||
this.logger.info('Simulating user notification', {
|
||||
title: config.title,
|
||||
body: config.body,
|
||||
|
||||
Reference in New Issue
Block a user