TypeScript
TypeScript copied to clipboard
It is proposed to add support for multiple jsx factory functions.
Suggestion
In the same project, when multiple jsx factory functions are required, there will always be complex configurations and type conflicts. It is recommended that you configure file suffixes and type spaces for multiple factory functions in one tsconfig.json. For example:
{
"compilerOptions": {
"jsxResolver": [{
"ext": ".react.tsx",
"jsxImportSource": "react"
}, {
"ext": ".vue.tsx",
"jsxImportSource": "vue"
}, {
"ext": ".mylib.tsx",
"jsxImportSource": "my-lib"
}, {
...
}]
}
}
🔍 Search Terms
jsx factory, multiple jsx factory, custom jsx factory
✅ Viability Checklist
My suggestion meets these guidelines:
- [x] This wouldn't be a breaking change in existing TypeScript/JavaScript code
- [x] This wouldn't change the runtime behavior of existing JavaScript code
- [x] This could be implemented without emitting different JS based on the types of the expressions
- [x] This isn't a runtime feature (e.g. library functionality, non-ECMAScript syntax with JavaScript output, new syntax sugar for JS, etc.)
- [x] This feature would agree with the rest of TypeScript's Design Goals.
+1 for this. It would greatly improve the DX in multi-framework environments like Astro.
Are there any updates to this feature?
Are there any updates to this feature?