Skip to content
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

Improve the JSX situation #48

Open
max-kamps opened this issue Jun 22, 2023 · 1 comment
Open

Improve the JSX situation #48

max-kamps opened this issue Jun 22, 2023 · 1 comment
Labels
blocked Issue that can't currently be solved code enhancement

Comments

@max-kamps
Copy link
Owner

Currently, the following problems exist:

  • util.jsxCreateElement is slow
    • Check if document.createElement is the culprit, maybe switch to string templating
    • Investigate writing an alternate emitter plugin that outputs more optimized and inlined code
  • jsx.d.ts is morally wrong
    • Automatically generate it from some machine-readable data format that contains all valid HTML tags and attributes
    • Investigate typechecking children correctly (not all HTML elements can contain all other HTML elements)
    • Investigate new TS 5.1 type checking features (see issue Update to TypeScript 5.1 #47)
@max-kamps max-kamps added enhancement New feature or request code enhancement and removed enhancement New feature or request labels Jun 22, 2023
@max-kamps max-kamps added the blocked Issue that can't currently be solved label Sep 5, 2023
@max-kamps
Copy link
Owner Author

The changes in TS 5.1 ended up not being helpful. Neither will 5.2.
There is an active TypeScript issue about a feature that would allow correctly typechecking children of JSX elements: microsoft/TypeScript#14729

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked Issue that can't currently be solved code enhancement
Projects
None yet
Development

No branches or pull requests

1 participant