Skip to content

refactor: Replace any types with strict TypeScript types#154

Open
corevibe555 wants to merge 1 commit intoentrius:testfrom
corevibe555:refactor/replace-any-types-with-strict-types
Open

refactor: Replace any types with strict TypeScript types#154
corevibe555 wants to merge 1 commit intoentrius:testfrom
corevibe555:refactor/replace-any-types-with-strict-types

Conversation

@corevibe555
Copy link
Copy Markdown

@corevibe555 corevibe555 commented Apr 11, 2026

Summary

  • Replace any[] with PullRequestComment[] on the PR comments API hook
  • Replace prDetails: any with PullRequestDetails in PRHeader
  • Replace props: any with React.ImgHTMLAttributes<HTMLImageElement> in ReadmeViewer and ContributingViewer image renderers
  • Type conversation item arrays in PRComments and IssueConversation instead of using item: any in .map()

Related Issues

N/A — identified during codebase review

Type of Change

  • Bug fix
  • New feature
  • Refactor
  • Documentation
  • Other (describe below)

Screenshots

N/A — no visual changes. All changes are compile-time type annotations only.

Checklist

  • New components are modularized/separated where sensible
  • Uses predefined theme (e.g. no hardcoded colors)
  • Responsive/mobile checked
  • Tested against the test API
  • npm run format and npm run lint:fix have been run
  • npm run build passes
  • Screenshots included for any UI/visual changes

@corevibe555 corevibe555 changed the title refactor: Replace any types with strict TypeScript types in API layer… refactor: Replace any types with strict TypeScript types Apr 11, 2026
@corevibe555 corevibe555 force-pushed the refactor/replace-any-types-with-strict-types branch 2 times, most recently from d88fbd7 to b93bcdf Compare April 11, 2026 18:49
@corevibe555 corevibe555 force-pushed the refactor/replace-any-types-with-strict-types branch from b93bcdf to 0f9f7eb Compare April 11, 2026 19:02

/** A comment or the PR description rendered in the conversation timeline. */
type ConversationItem = Omit<PullRequestComment, 'id'> & {
id: number | string;
Copy link
Copy Markdown
Author

@corevibe555 corevibe555 Apr 11, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CUrrently, ConversationItem->id uses id: 'pr-description' for PR description and adds comments items in the same array, so this is required.(Refer PRComments.tsx line 63)

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.

1 participant