Skip to content

JSX element renaming issues #4093

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

Closed
tinganho opened this issue Jul 31, 2015 · 3 comments · Fixed by #4096
Closed

JSX element renaming issues #4093

tinganho opened this issue Jul 31, 2015 · 3 comments · Fixed by #4096
Assignees
Labels
Bug A bug in TypeScript Fixed A PR has been merged for this issue

Comments

@tinganho
Copy link
Contributor

I just noticed that renaming an JSX element doesn't rename the end tag. I also expect renaming an intrinsic element would be local, when in fact, it renames all elements of that type and even the interface member of JSX.IntrinsicElements. Renaming intrinsic elements is quite destructive for a project.

@RyanCavanaugh RyanCavanaugh added the Bug A bug in TypeScript label Jul 31, 2015
@RyanCavanaugh RyanCavanaugh self-assigned this Jul 31, 2015
@RyanCavanaugh
Copy link
Member

I just noticed that renaming an JSX element doesn't rename the end tag

Ouch, definitely a bug

I also expect renaming an intrinsic element would be local

I think the more likely fix is that we would disallow this the same way we disallow renaming things in lib.d.ts. Rename always means 'rename', not 'change to some other thing' -- switching a div to a span or what not should be a different operation.

@tinganho
Copy link
Contributor Author

Rename always means 'rename', not 'change to some other thing

👍

@RyanCavanaugh I also find that go to definition in the end tag doesn't work.

@RyanCavanaugh
Copy link
Member

#4096 should fix that as well

@mhegazy mhegazy added this to the TypeScript 1.6 milestone Jul 31, 2015
RyanCavanaugh added a commit that referenced this issue Aug 6, 2015
Fixes renaming not affecting JSX closing tags (#4093)
@mhegazy mhegazy added the Fixed A PR has been merged for this issue label Aug 6, 2015
@microsoft microsoft locked and limited conversation to collaborators Jun 19, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug A bug in TypeScript Fixed A PR has been merged for this issue
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants