Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In the past, we generated jsx format virtual code for templates based on the jsxTemplates option to obtain complete generic support, but with 1.4 substantially refactoring virtual code generation, we found a way to support generics for class components and functional components at the same time without relying on jsx , if you are interested in the principle, here is the playground link.
https://www.typescriptlang.org/play?#code/CYUwxgNghgTiAEYD2A7AzgF3gMQK4rAwEtUoIBhJAWwAdUQUMAueAHgBUA+AChpiRpoWAb3gA3MrhAt2AGnGSQQ+OwDaAXXgBfAJTwAvJ3hQUATwDcAKEuhIsBMnRZy0NGkq16jFihAB3Ni5efkERBQgpGXkJCKUZDW09Q3hRABI+AWUMUxoQJAAzeAzBbSsbcGg4eHz8QhIUYzQ8AmJSCmo6X0YOeQBpHmYVeQBrFl6dJksASHZ4EAAPDAZgNHhfAO4AOm3YAHNlE1Mko0P4AH5pqd65xeXVtOK0M5YiFHyQGHgABRC0LUupmd4MFMiwfpljsYzACfCAxB9pjIbksUCtgdtNnsDmZIacgexEWs4QjLAB6ABU5Ms8HJbGadTaHk6DCwMSk+gARJgYBz4Ew2UpOQBGXmkzjU8mk6yk0nwAACGDQAFoiLsUEg4JZHJhEB0hQZGvTWigyEyvBhuEb6qaOub5OscLVjTbPF0LaIBSwAOTcr3RRTKfW6HRlZC0IXcD2Kb2+-2xQOJeAy+C4NAIbK5MAAC3Aw3gcDQuAgWAwWaIqwgrxA0spErYLigbjNbvC7K5GB5fIFaGFovFNKlZNlCuVqvVmu1WDDNAATAbG1bGba3dwG03lyz7f54Gv3BvGJHW9J4D6O36jwng6GOjPD56T7GLywg3pk6n0zlwDmwHmC0WS2WFZVpYQA
Why is this important?
Note that this is not a breaking change, users should not be aware of this change, but just remove the jsxTemplates option from tsconfig as it is no longer needed.
Target version: >= v1.5.0 pre-release