-
Notifications
You must be signed in to change notification settings - Fork 12.6k
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
[test] Intrinsics with colon no longer type-checked #53784
Conversation
declare global { | ||
namespace JSX { | ||
interface IntrinsicElements { | ||
['fbt:enum']: { knownProp: string }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe this needs to be declared another way now that #47356 has landed? But even if we drop support for that, the error message currently produced is not helpful. It silently treats <fbt:enum />
as any.
This PR doesn't have any linked issues. Please open an issue that references this PR. From there we can discuss and prioritise. |
@typescript-bot cherry-pick this to revert-47356-feat/7411 |
Heya @DanielRosenwasser, I've started to run the task to cherry-pick this into |
Hey @DanielRosenwasser, I've opened #53793 for you. |
…-47356-feat/7411 (#53793) Co-authored-by: eps1lon <silbermann.sebastian@gmail.com>
@eps1lon Thank you for taking the time to immediately test the latest changes and identify the new important edge case. I've created a new pull request #53799 that fixes the bug. @DanielRosenwasser I noticed that you opened a PR to revert the changes. Would you like me to create a new PR after merging the revert into the main branch? |
Yeah I just wanted to see if the behavior was changed. If we can get in your fix (just apply my test suggestions, update baselines, and take the PR out of draft state) then I think I can bring it into the TS 5.1 beta. |
Fixed in #53799 |
types/fbt is currently broken in 5.1.0-dev.20230415
Broke in #47356
I'm not sure yet whether this was caused by #51328 or #53284.
Considering #53284 because the hovering with the cursor treats the parts before and after the colon as separate types:
5.0:
5.1: