Skip to content

Syncing automatically jsx.d.ts and jsx-h.d.ts files #408

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

Open
titoBouzout opened this issue Apr 11, 2025 · 1 comment · May be fixed by #421
Open

Syncing automatically jsx.d.ts and jsx-h.d.ts files #408

titoBouzout opened this issue Apr 11, 2025 · 1 comment · May be fixed by #421

Comments

@titoBouzout
Copy link
Contributor

It would be nice to sync automatically jsx.d.ts and jsx-h.d.ts because doing it manually is prone to error (and rarely time-consuming when there are a lot of changes at once).

I suppose this can be done with https://github.com/oxc-project/oxc but last time I tried parsing JSX types with it, it failed for different reasons.

@edemaine proposed to only update jsx-h.d.ts and remove the FunctionMaybe and friends from it. Sounds like a plan.

@titoBouzout
Copy link
Contributor Author

titoBouzout commented May 5, 2025

The script is live in https://github.com/ryansolid/dom-expressions/blob/main/packages/dom-expressions/src/jsx-update.mjs

dom-expressions subpackage has a section in readme https://github.com/ryansolid/dom-expressions/tree/main/packages/dom-expressions#updating-jsx-types , Reads as follows:

Updating JSX Types

JSX types are located in packages/dom-expressions/src/jsx-h.d.ts.

To update JSX types:

  1. modify/update packages/dom-expressions/src/jsx-h.d.ts
  2. run node jsx-update.mjs in packages/dom-expressions/src/

I am leaving this open because it would be nice to have a npm run jsx-sync-types or similar

@titoBouzout titoBouzout linked a pull request May 20, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant