Skip to content

[compiler] Allow type cast expressions with refs#31871

Merged
josephsavona merged 1 commit into
facebook:mainfrom
josephsavona:ref-type-casts
Dec 20, 2024
Merged

[compiler] Allow type cast expressions with refs#31871
josephsavona merged 1 commit into
facebook:mainfrom
josephsavona:ref-type-casts

Conversation

@josephsavona
Copy link
Copy Markdown
Member

We report a false positive for the combination of a ref-accessing function placed inside an array which is they type-cast. Here we teach ref validation about type casts. I also tried other variants like return ref as const but those already worked.

Closes #31864

We report a false positive for the combination of a ref-accessing function placed inside an array which is they type-cast. Here we teach ref validation about type casts. I also tried other variants like `return ref as const` but those already worked.

Closes facebook#31864
@vercel
Copy link
Copy Markdown

vercel Bot commented Dec 20, 2024

Deployment failed with the following error:

You don't have permission to create a Preview Deployment for this project.

View Documentation: https://vercel.com/docs/accounts/team-members-and-roles

@facebook-github-bot facebook-github-bot added CLA Signed React Core Team Opened by a member of the React Core Team labels Dec 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed React Core Team Opened by a member of the React Core Team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Compiler Bug]: Linter complains about ref current access during render when returning array with Typescript's as const

3 participants