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

Bug: Change status variable type #31467

Open
GeorgiosDrivas opened this issue Nov 9, 2024 · 3 comments
Open

Bug: Change status variable type #31467

GeorgiosDrivas opened this issue Nov 9, 2024 · 3 comments
Labels
Status: Unconfirmed A potential issue that we haven't yet confirmed as a bug

Comments

@GeorgiosDrivas
Copy link

I noticed the status variable in the ReactPromise function of the ReactFlightClient file, is of type any.

If the status is always of type String, it would be a good idea to replace any with string. This helps provide stronger type checking, reduces the risk of bugs, and improves code readability.

ReactFlightClient.js
line: 206

function

@GeorgiosDrivas GeorgiosDrivas added the Status: Unconfirmed A potential issue that we haven't yet confirmed as a bug label Nov 9, 2024
@abay-2002
Copy link

yes 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.

@MoonBrillante
Copy link

I would like to work on this issue. Could you please assign it to me?

@ifabriciorodrigues
Copy link

Hello! Instead of just changing any to string, perhaps a type mapping the possibilities would be better for autocompletion?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Unconfirmed A potential issue that we haven't yet confirmed as a bug
Projects
None yet
Development

No branches or pull requests

4 participants