-
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
Fail when JSX.IntrinsicElements is an intersection type #13345
Labels
Milestone
Comments
1 task
Is there any update on this issue? |
Closed
This issue is still present in 2.2.1 - the compiler still crashes with an unhandled exception. |
RyanCavanaugh
added
the
Needs Investigation
This issue needs a team member to investigate its status.
label
May 24, 2017
RyanCavanaugh
added
Bug
A bug in TypeScript
and removed
Needs Investigation
This issue needs a team member to investigate its status.
labels
Sep 19, 2019
This is still actual in 3.6.3. |
Still actual in 4.0.3 though the message changed a bit
|
Full stack on 4.0.3
|
Compiler no longer crashes on this example, starting from version 4.3. Seems the issue has been fixed. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
TypeScript Version: 2.1.4, 2.2.1, 3.6.3, 4.0.3
The compiler does not support JSX.IntrinsicElements that are intersections. It even fails with an exception instead of an error message.
The reason why I think I require this behavior is that I want the IntrinsicElements to be something like:
{ [P in keyof HTMLElementTagNameMap]: Partial<HTMLElementTagNameMap[P]> } & { [P: string]: Partial<HTMLElement> }
Code
intrinsic.jsx.d.ts
intrinsic.tsx
tsconfig.json
Expected behavior:
IntrinsicElements4
variation should work the same asIntrinsicElements3
which is semantically the same.Actual behavior:
The code does not compile, the compiler fails with an exception:
The text was updated successfully, but these errors were encountered: