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

[test] Intrinsics with colon no longer type-checked #53784

Closed
wants to merge 4 commits into from

Conversation

eps1lon
Copy link
Contributor

@eps1lon eps1lon commented Apr 15, 2023

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:

Screenshot from 2023-04-15 10-26-01

5.1:

Screenshot from 2023-04-15 10-27-06
Screenshot from 2023-04-15 10-27-02

@typescript-bot typescript-bot added the For Uncommitted Bug PR for untriaged, rejected, closed or missing bug label Apr 15, 2023
declare global {
namespace JSX {
interface IntrinsicElements {
['fbt:enum']: { knownProp: string };
Copy link
Contributor Author

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.

@eps1lon eps1lon marked this pull request as ready for review April 15, 2023 09:10
@typescript-bot
Copy link
Collaborator

This PR doesn't have any linked issues. Please open an issue that references this PR. From there we can discuss and prioritise.

@DanielRosenwasser
Copy link
Member

@typescript-bot cherry-pick this to revert-47356-feat/7411

@typescript-bot
Copy link
Collaborator

typescript-bot commented Apr 15, 2023

Heya @DanielRosenwasser, I've started to run the task to cherry-pick this into revert-47356-feat/7411 on this PR at 9e4bfaf. You can monitor the build here.

@typescript-bot
Copy link
Collaborator

Hey @DanielRosenwasser, I've opened #53793 for you.

typescript-bot pushed a commit to typescript-bot/TypeScript that referenced this pull request Apr 15, 2023
Component commits:
d61ffe1 [test] Intrinsics with colon no longer type-checked

3f81077 f

a4e76fd f

9e4bfaf f
DanielRosenwasser pushed a commit that referenced this pull request Apr 15, 2023
…-47356-feat/7411 (#53793)

Co-authored-by: eps1lon <silbermann.sebastian@gmail.com>
@a-tarasyuk
Copy link
Contributor

@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?

@DanielRosenwasser
Copy link
Member

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.

@eps1lon
Copy link
Contributor Author

eps1lon commented Apr 17, 2023

Fixed in #53799

@eps1lon eps1lon closed this Apr 17, 2023
@eps1lon eps1lon deleted the fix/jsx-element-types/colon branch April 17, 2023 07:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
For Uncommitted Bug PR for untriaged, rejected, closed or missing bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants