feat: complete Priority 1 type safety improvements

- Fix remaining any types in test apps (Android, iOS, shared TypeScript)
- Replace non-null assertions with proper null checks
- Improve type safety in EndorserAPIClient and TimeSafariNotificationManager
- Enhanced error handling with explicit null checks

Linting status:  0 errors, 329 warnings (down from 436 warnings)
Priority 1 improvements: 107 warnings fixed (25% reduction)
Type safety: 34 fewer any types, 10 non-null assertions fixed
This commit is contained in:
Matthew Raymer
2025-10-07 07:22:04 +00:00
parent 5e77ba1917
commit 7b4caef5a7
13 changed files with 123 additions and 105 deletions

View File

@@ -243,7 +243,7 @@ export interface UserNotificationConfig {
badge?: boolean;
actions?: NotificationAction[];
category?: string;
userInfo?: Record<string, any>;
userInfo?: Record<string, unknown>;
}
export interface NotificationAction {
@@ -271,7 +271,7 @@ export interface ContentFetchResult {
contentAge: number;
error?: string;
retryCount: number;
metadata?: Record<string, any>;
metadata?: Record<string, unknown>;
}
export interface DualScheduleStatus {
@@ -358,7 +358,7 @@ export interface DailyNotificationPlugin {
resumeDualSchedule(): Promise<void>;
// Content management methods
getContentCache(): Promise<Record<string, any>>;
getContentCache(): Promise<Record<string, unknown>>;
clearContentCache(): Promise<void>;
getContentHistory(): Promise<ContentFetchResult[]>;
@@ -415,7 +415,7 @@ export interface OfferSummaryRecord {
amountGivenConfirmed: number;
objectDescription: string;
validThrough?: string;
fullClaim?: Record<string, any>;
fullClaim?: Record<string, unknown>;
}
export interface OffersToPlansResponse {
@@ -443,7 +443,7 @@ export interface PlansLastUpdatedResponse {
export interface PlanSummaryWithPreviousClaim {
plan: PlanSummary;
wrappedClaimBefore?: Record<string, any>;
wrappedClaimBefore?: Record<string, unknown>;
}
export interface PlanSummary {
@@ -507,7 +507,7 @@ export interface TimeSafariProjectNotification {
project: PlanSummary;
changes?: {
fields: string[];
previousValues?: Record<string, any>;
previousValues?: Record<string, unknown>;
};
relevantOffers?: OfferSummaryRecord[];
notificationPriority: 'high' | 'medium' | 'low';
@@ -519,7 +519,7 @@ export interface TimeSafariPersonNotification {
personDid: string;
changes?: {
fields: string[];
previousValues?: Record<string, any>;
previousValues?: Record<string, unknown>;
};
relevantProjects?: PlanSummary[];
notificationPriority: 'high' | 'medium' | 'low';
@@ -531,7 +531,7 @@ export interface TimeSafariItemNotification {
itemId: string;
changes?: {
fields: string[];
previousValues?: Record<string, any>;
previousValues?: Record<string, unknown>;
};
relevantContext?: 'project' | 'offer' | 'person';
notificationPriority: 'high' | 'medium' | 'low';