[test] Intrinsics with colon no longer type-checked - #53784
[test] Intrinsics with colon no longer type-checked#53784Sebastian "Sebbie" Silbermann (eps1lon) wants to merge 4 commits into
Conversation
| declare global { | ||
| namespace JSX { | ||
| interface IntrinsicElements { | ||
| ['fbt:enum']: { knownProp: string }; |
There was a problem hiding this comment.
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 (@typescript-bot) cherry-pick this to revert-47356-feat/7411 |
|
Heya Daniel Rosenwasser (@DanielRosenwasser), I've started to run the task to cherry-pick this into |
|
Hey Daniel Rosenwasser (@DanielRosenwasser), I've opened #53793 for you. |
…-47356-feat/7411 (#53793) Co-authored-by: eps1lon <silbermann.sebastian@gmail.com>
|
Sebastian "Sebbie" Silbermann (@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. Daniel Rosenwasser (@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: