feat: complete Priority 2 console cleanup and start return types
🚀 Priority 2 Progress: - Completed console statement cleanup in test apps (TimeSafariNotificationManager) - Completed console statement cleanup in core plugin (web implementation) - Started return type annotations in polling contracts - Started return type annotations in test apps Console statements: 60 remaining (down from 128, 53% reduction) Return types: 54 remaining (down from 62, 13% reduction) Linting status: ✅ 0 errors, 156 warnings (down from 436 warnings) Total improvement: 280 warnings fixed (64% reduction) Priority 2: Excellent progress on both console cleanup and return types
This commit is contained in:
@@ -70,10 +70,13 @@ export function validateRateLimitResponse(data: unknown): boolean {
|
||||
/**
|
||||
* Create response schema validator
|
||||
*/
|
||||
export function createResponseValidator<T>(schema: z.ZodSchema<T>) {
|
||||
export function createResponseValidator<T>(schema: z.ZodSchema<T>): {
|
||||
validate: (data: unknown) => data is T;
|
||||
transformError: (error: unknown) => PollingError;
|
||||
} {
|
||||
return {
|
||||
validate: (data: unknown): data is T => schema.safeParse(data).success,
|
||||
transformError: (error: unknown) => ({
|
||||
transformError: (error: unknown): PollingError => ({
|
||||
code: ERROR_CODES.VALIDATION_ERROR,
|
||||
message: error.message || 'Validation failed',
|
||||
retryable: false
|
||||
|
||||
Reference in New Issue
Block a user