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(tsx): Transform top level returns into throws #1028

Merged
merged 5 commits into from
Jul 22, 2024

Conversation

Princesseuh
Copy link
Member

@Princesseuh Princesseuh commented Jul 17, 2024

Changes

This PR makes it so top level returns are transformed into throws in the generated TSX

Fixes withastro/language-tools#476

Testing

Added a test

Docs

N/A

Copy link

changeset-bot bot commented Jul 17, 2024

🦋 Changeset detected

Latest commit: 643942e

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

This PR includes changesets to release 1 package
Name Type
@astrojs/compiler Patch

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

@Princesseuh Princesseuh marked this pull request as ready for review July 18, 2024 11:14
Copy link
Contributor

@matthewp matthewp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

finally 🙌

@Princesseuh Princesseuh merged commit 7fa6577 into main Jul 22, 2024
5 checks passed
@Princesseuh Princesseuh deleted the fix/top-level-returns branch July 22, 2024 21:36
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 this pull request may close these issues.

astro check reports that a used function is not used
4 participants