microsoft / TypeScript

TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
https://www.typescriptlang.org
Apache License 2.0
100.81k stars 12.46k forks source link

It is proposed to add support for multiple jsx factory functions. #52023

Open textbus opened 1 year ago

textbus commented 1 year ago

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:

Enteleform commented 1 year ago

+1 for this. It would greatly improve the DX in multi-framework environments like Astro.

Christoph-Koschel commented 2 months ago

Are there any updates to this feature?

TenviLi commented 1 week ago

Are there any updates to this feature?