Add standalone TypeScript interfaces for React migration (Phase 1)#165
Open
devin-ai-integration[bot] wants to merge 1 commit intomasterfrom
Open
Add standalone TypeScript interfaces for React migration (Phase 1)#165devin-ai-integration[bot] wants to merge 1 commit intomasterfrom
devin-ai-integration[bot] wants to merge 1 commit intomasterfrom
Conversation
Convert Angular classes from src/app/shared/models/ to TypeScript interfaces in src/types/ for use by the React app (Phase 1 of migration). Types added: Story, Comment, User, PollResult, FeedType, Settings Co-Authored-By: Eashan Sinha <eashan.sinha@codeium.com>
Author
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
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.
Add standalone TypeScript interfaces for React migration (Phase 1)
Summary
Converts Angular class-based models from
src/app/shared/models/into standalone TypeScript interfaces under a newsrc/types/directory for use by the React app. This is Phase 1 of a multi-phase migration — only type definitions, no behavioral changes.Types added:
Story,Comment,User,PollResult,FeedType,SettingsAll types are re-exported from
src/types/index.tsas a barrel file.No existing files were modified.
Review & Testing Checklist for Human
time_agotype inconsistency:Story.time_agoisnumberbutComment.time_agoisstring. This matches the original Angular models, but verify against the actual HN API to confirm this is intentional and not a latent bug being carried forward.User.crated_timetypo: The field namecrated_timeis carried over from the original Angular model. Decide whether to fix it tocreated_timenow (breaking change vs API shape) or leave it for a later PR.url,poll,domainmay be absent on certain item types). Consider adding?where appropriate before the React app consumes these types.Notes
npx tsc --noEmiton thesrc/types/files to confirm they compile cleanly.Requested by: @eashansinha
Link to Devin run