[compiler] Support inline enums (flow/ts), type declarations#33747
Merged
josephsavona merged 1 commit intomainfrom Jul 10, 2025
Merged
[compiler] Support inline enums (flow/ts), type declarations#33747josephsavona merged 1 commit intomainfrom
josephsavona merged 1 commit intomainfrom
Conversation
poteto
approved these changes
Jul 9, 2025
This was referenced Jul 9, 2025
josephsavona
added a commit
that referenced
this pull request
Jul 10, 2025
) * Error for `eval()` * More specific error message for `with (expr) { ... }` syntax * More specific error message for class declarations --- [//]: # (BEGIN SAPLING FOOTER) Stack created with [Sapling](https://sapling-scm.com). Best reviewed with [ReviewStack](https://reviewstack.dev/facebook/react/pull/33746). * #33752 * #33751 * #33750 * #33748 * #33747 * __->__ #33746
Supports inline enum declarations in both Flow and TS by treating the node as pass-through (enums can't capture values mutably). Related, this PR extends the set of type-related declarations that we ignore. Previously we threw a todo for things like DeclareClass or DeclareVariable, but these are type related and can simply be dropped just like we dropped TypeAlias.
github-actions bot
pushed a commit
that referenced
this pull request
Jul 10, 2025
) * Error for `eval()` * More specific error message for `with (expr) { ... }` syntax * More specific error message for class declarations --- [//]: # (BEGIN SAPLING FOOTER) Stack created with [Sapling](https://sapling-scm.com). Best reviewed with [ReviewStack](https://reviewstack.dev/facebook/react/pull/33746). * #33752 * #33751 * #33750 * #33748 * #33747 * __->__ #33746 DiffTrain build for [4a3ff8e](4a3ff8e)
github-actions bot
pushed a commit
that referenced
this pull request
Jul 10, 2025
) * Error for `eval()` * More specific error message for `with (expr) { ... }` syntax * More specific error message for class declarations --- [//]: # (BEGIN SAPLING FOOTER) Stack created with [Sapling](https://sapling-scm.com). Best reviewed with [ReviewStack](https://reviewstack.dev/facebook/react/pull/33746). * #33752 * #33751 * #33750 * #33748 * #33747 * __->__ #33746 DiffTrain build for [4a3ff8e](4a3ff8e)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Supports inline enum declarations in both Flow and TS by treating the node as pass-through (enums can't capture values mutably). Related, this PR extends the set of type-related declarations that we ignore. Previously we threw a todo for things like DeclareClass or DeclareVariable, but these are type related and can simply be dropped just like we dropped TypeAlias.
Stack created with Sapling. Best reviewed with ReviewStack.