Skip to content

fix: resolve TypeScript errors in release-list component#1

Merged
codeMaestro78 merged 1 commit into
masterfrom
website-up
Dec 7, 2025
Merged

fix: resolve TypeScript errors in release-list component#1
codeMaestro78 merged 1 commit into
masterfrom
website-up

Conversation

@codeMaestro78

Copy link
Copy Markdown
Owner

No description provided.

Copilot AI review requested due to automatic review settings December 7, 2025 09:28
@vercel

vercel Bot commented Dec 7, 2025

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
mlcli Ready Ready Preview Comment Dec 7, 2025 9:28am

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR resolves TypeScript errors in the release-list component by fixing type issues in the ReactMarkdown code component customization. The changes restructure how props are handled and add necessary type assertions to satisfy TypeScript's type checking.

Key Changes:

  • Refactored props destructuring in the ReactMarkdown code component to avoid TypeScript errors
  • Added type assertion for the oneDark style object to satisfy react-syntax-highlighter's type requirements
  • Replaced the inline prop with computed isInline logic based on language match detection

Reviewed changes

Copilot reviewed 1 out of 2 changed files in this pull request and generated 1 comment.

File Description
website/tsconfig.tsbuildinfo TypeScript build artifact updated after compilation
website/src/components/releases/release-list.tsx Fixed TypeScript errors in code component by restructuring props handling and adding type assertion

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +106 to +108
const isInline = !match;

return !isInline && match ? (

Copilot AI Dec 7, 2025

Copy link

Choose a reason for hiding this comment

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

[nitpick] The isInline variable and the condition !isInline && match could be simplified. Since isInline = !match, the condition !isInline && match is equivalent to just checking match. Consider simplifying to:

const match = /language-(\w+)/.exec(className || '');

return match ? (
  // block code with syntax highlighting
) : (
  // inline code
);

This makes the logic clearer and removes the unnecessary intermediate variable.

Suggested change
const isInline = !match;
return !isInline && match ? (
return match ? (

Copilot uses AI. Check for mistakes.
@codeMaestro78
codeMaestro78 merged commit 374ed3f into master Dec 7, 2025
10 checks passed
codeMaestro78 added a commit that referenced this pull request Dec 10, 2025
Merge pull request #1 from codeMaestro78/website-up
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.

2 participants