Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Status variable type #31468

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

GeorgiosDrivas
Copy link

Summary

Issue: #31467

I noticed the status variable in the ReactPromise function of the ReactFlightClient file, is of type any. After carefully checking every other mention of this variable to make sure about it's type, I changed it into string to better suite the intented type and avoid risk of bugs.

screen

How did you test this change?

I run the following commands:

  • yarn
  • yarn test

Copy link

vercel bot commented Nov 9, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
react-compiler-playground ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 9, 2024 5:38pm

@react-sizebot
Copy link

The size diff is too large to display in a single comment. The GitHub action for this pull request contains an artifact called 'sizebot-message.md' with the full message.

Generated by 🚫 dangerJS against 108fd83

Copy link

@abay-2002 abay-2002 left a comment

Choose a reason for hiding this comment

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

yeah that would

  • Provide stronger type checking, reducing the risk of bugs.
  • Improve code readability by clearly indicating that status is expected to be a string.
  • Align with TypeScript best practices by avoiding the use of any when a more specific type can be used.
    Let me know yo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants