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

fix(html): Export HTML components as default export so their type is valid JSX #7296

Merged
merged 3 commits into from
Jun 5, 2023

Conversation

Princesseuh
Copy link
Member

Changes

The export shape for HTML component is an object with a render function on it, this is very cool but unfortunately, it's an invalid type for JSX. This PR changes it to be a default exported function instead, which doesn't change the usage.

This PR also includes a small change to the type reference in env.d.ts to point to client-base.d.ts instead of client.d.ts, as the later includes some definitions that we should be overwriting later on

Fix withastro/language-tools#447
Fix withastro/language-tools#557

Testing

Tests should still pass!

Docs

N/A

@changeset-bot
Copy link

changeset-bot bot commented Jun 5, 2023

🦋 Changeset detected

Latest commit: e744678

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions github-actions bot added the pkg: astro Related to the core `astro` package (scope) label Jun 5, 2023
@bluwy
Copy link
Member

bluwy commented Jun 5, 2023

The change makes sense to me, but it looks like the tests are failing.

@Princesseuh
Copy link
Member Author

The change makes sense to me, but it looks like the tests are failing.

Seems to be Solid tests, weird. I'll take a look

@Princesseuh
Copy link
Member Author

I honestly have no idea. Any clue what that could be @natemoo-re?

Co-authored-by: Bjorn Lu <bjornlu.dev@gmail.com>
@Princesseuh Princesseuh merged commit a7e2b37 into main Jun 5, 2023
@Princesseuh Princesseuh deleted the fix/html-components branch June 5, 2023 14:40
@astrobot-houston astrobot-houston mentioned this pull request Jun 5, 2023
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pkg: astro Related to the core `astro` package (scope)
Projects
None yet
3 participants