refactor: improve type safety and revamp api client#2343
Open
jcscottiii wants to merge 1 commit intomainfrom
Open
refactor: improve type safety and revamp api client#2343jcscottiii wants to merge 1 commit intomainfrom
jcscottiii wants to merge 1 commit intomainfrom
Conversation
aba23b2 to
d97810d
Compare
Refactored the frontend to use stricter typing and path-aware response handling. Replaced unsafe type assertions with type guards and updated the API client to handle specific status codes more robustly. - Reorganized api/client.ts to use status code handlers per endpoint - Added type guards for saved searches and vendor positions - Cleaned up manual casts and redundant checks across components - Fixed various linting and formatting issues to match project standards
d97810d to
315f397
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refactored the frontend to use stricter typing and path-aware response handling. Replaced unsafe type assertions with type guards and updated the API client to handle specific status codes more robustly.
Rules that are enabled now:
This prevents the use of
any,astype casting andunknown