Skip to content

fix(#574): Remove all any usages from ProfileEditForm.tsx#635

Merged
llinsss merged 1 commit into
DogStark:mainfrom
Inkman007:fix/574-profile-edit-form-types
Jun 25, 2026
Merged

fix(#574): Remove all any usages from ProfileEditForm.tsx#635
llinsss merged 1 commit into
DogStark:mainfrom
Inkman007:fix/574-profile-edit-form-types

Conversation

@Inkman007

Copy link
Copy Markdown
Contributor

Summary

  • Defines UserProfileData, UserProfile, and ProfileCompletionState interfaces to replace every any in the component
  • onSubmit prop typed (data: UserProfileData) => Promise<void> instead of (data: any)
  • calculateCompletion and calculateMissingFields helpers typed (userData: UserProfileData): number / string[]
  • profileCompletion state typed ProfileCompletionState | null instead of any
  • catch (error: any) narrowed to catch (error: unknown) with instanceof Error guard

Changes

  • src/components/Profile/ProfileEditForm.tsx — 4 any usages removed, 3 new interfaces added

Test plan

  • Profile form loads and pre-populates correctly from user prop
  • Submitting the form calls onSubmit with the correct typed payload
  • A simulated onSubmit rejection still shows the error message in the UI
  • tsc --noEmit passes with no errors on the modified file

Closes #574

Introduces UserProfileData, UserProfile, and ProfileCompletionState
interfaces to replace all four any usages: onSubmit parameter,
calculateCompletion/calculateMissingFields arguments, the profileCompletion
state, and the catch clause which is now narrowed with instanceof Error.
@drips-wave

drips-wave Bot commented Jun 24, 2026

Copy link
Copy Markdown

@Inkman007 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@llinsss llinsss merged commit f2db1d8 into DogStark:main Jun 25, 2026
6 of 13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Frontend] Type ProfileEditForm.tsx Props and Handlers Properly (Remove any)

2 participants