Skip to content

fix: resolve strict TypeScript variant errors - #1042

Open
dinhnguyenminhhoang wants to merge 2 commits into
DavidHDev:mainfrom
dinhnguyenminhhoang:fix-typescript-variants
Open

fix: resolve strict TypeScript variant errors#1042
dinhnguyenminhhoang wants to merge 2 commits into
DavidHDev:mainfrom
dinhnguyenminhhoang:fix-typescript-variants

Conversation

@dinhnguyenminhhoang

Copy link
Copy Markdown

Fixes #1041

Summary

  • Fix strict TypeScript errors in AcidSquares TS-CSS and TS-TW variants.
  • Fix nullable target narrowing in SpecularButton variants.
  • Fix polymorphic tag and ref typing in SplitText variants.

Validation

  • npm exec tsc -- --noEmit --pretty false
  • npm exec vite build
  • Browser smoke-tested dev and production routes.
  • No console errors observed in affected components.

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 strict TypeScript typecheck failures across TS-CSS and TS-Tailwind component variants for AcidSquares, SpecularButton, and SplitText, aligning the variants with the repo’s strict TS configuration and addressing the errors described in #1041.

Changes:

  • Fixes nullable/optional RenderTarget typing and usage in AcidSquares variants.
  • Fixes nullable narrowing for the computed target angle in SpecularButton variants.
  • Fixes polymorphic tag + ref typing in SplitText variants by switching to an HTMLElement ref strategy.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
src/ts-tailwind/TextAnimations/SplitText/SplitText.tsx Adjusts polymorphic tag/ref typing to avoid never props and ref typing issues under strict TS.
src/ts-tailwind/Components/SpecularButton/SpecularButton.tsx Tightens nullable narrowing for animation target angle selection.
src/ts-tailwind/Backgrounds/AcidSquares/AcidSquares.tsx Updates RenderTarget lifecycle/typing to avoid null vs undefined strict TS errors.
src/ts-default/TextAnimations/SplitText/SplitText.tsx Mirrors SplitText polymorphic ref typing fix in the default variant.
src/ts-default/Components/SpecularButton/SpecularButton.tsx Mirrors SpecularButton nullable narrowing fix in the default variant.
src/ts-default/Backgrounds/AcidSquares/AcidSquares.tsx Mirrors AcidSquares RenderTarget typing/lifecycle updates in the default variant.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread src/ts-tailwind/TextAnimations/SplitText/SplitText.tsx Outdated
Comment thread src/ts-default/TextAnimations/SplitText/SplitText.tsx Outdated
Comment thread src/ts-default/Backgrounds/AcidSquares/AcidSquares.tsx
Comment thread src/ts-tailwind/Backgrounds/AcidSquares/AcidSquares.tsx
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.

[BUG]: TypeScript variants fail strict typecheck with 14 errors

2 participants