Skip to content

fix(react): type polymorphic as prop - #1479

Merged
Anber merged 1 commit into
masterfrom
anber/fix-polymorphic-as-type
Jun 23, 2026
Merged

fix(react): type polymorphic as prop#1479
Anber merged 1 commit into
masterfrom
anber/fix-polymorphic-as-type

Conversation

@Anber

@Anber Anber commented Jun 23, 2026

Copy link
Copy Markdown
Collaborator

Fixes #1414.

Summary

  • Type intrinsic props selected by the polymorphic as prop on styled components.
  • Preserve existing styled component React static field typing such as propTypes.
  • Add dtslint coverage for both direct calls and JSX usage.

Validation

  • pnpm --filter @linaria/react test:dts
  • pnpm --filter @linaria/react typecheck
  • pnpm --filter @linaria/react test
  • pnpm --filter @linaria/react build
  • pnpm check:all

@Anber
Anber force-pushed the anber/fix-polymorphic-as-type branch from a850355 to b15e38c Compare June 23, 2026 07:30
@changeset-bot

changeset-bot Bot commented Jun 23, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: b15e38c

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@linaria/react Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@Anber
Anber marked this pull request as ready for review June 23, 2026 07:37
@Anber
Anber merged commit 74a417b into master Jun 23, 2026
8 checks passed
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.

"as" polymorphic prop returns incorrect type

1 participant