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

Fragments are compiled with a space, which fails in TypeScript 5.7 #1053

Open
1 task
rktyt opened this issue Dec 4, 2024 · 2 comments
Open
1 task

Fragments are compiled with a space, which fails in TypeScript 5.7 #1053

rktyt opened this issue Dec 4, 2024 · 2 comments
Labels
- P4: important Violate documented behavior or significantly improves performance (priority) feat: tsx Related to the TSX output (scope)

Comments

@rktyt
Copy link

rktyt commented Dec 4, 2024

Astro Info

Astro                    v5.0.2
Node                     v20.15.0
System                   Linux (arm64)
Package Manager          npm
Output                   server
Adapter                  @astrojs/node
Integrations             none

If this issue only occurs in one browser, which browser is a problem?

No response

Describe the Bug

<></> notation is reported as an error in npx astro check.

error ts(2604): Component '< >' is not a valid component.
If this is a Svelte or Vue component, it might have a syntax error that makes it impossible to parse.


There is no error in [email protected]

What's the expected result?

No errors

Link to Minimal Reproducible Example

https://stackblitz.com/edit/github-bhs7qr-52hbdf?file=package.json

Participation

  • I am willing to submit a pull request for this issue.
@github-actions github-actions bot added the needs triage Issue needs to be triaged label Dec 4, 2024
@ascorbic ascorbic transferred this issue from withastro/astro Dec 4, 2024
@ascorbic ascorbic added - P4: important Violate documented behavior or significantly improves performance (priority) and removed needs triage Issue needs to be triaged labels Dec 4, 2024
@ascorbic ascorbic changed the title astro check is partially broken in typescript5.7 Fragments are compiled with a space, which fails in TypeScript 5.7 Dec 4, 2024
@ascorbic
Copy link

ascorbic commented Dec 4, 2024

Quoting @Princesseuh:

The compiler is transforming <>Hello</> into < >Hello</> and perhaps TS is now reporting that as an error, whereas previously it ignored the space

@ascorbic ascorbic added the feat: tsx Related to the TSX output (scope) label Dec 4, 2024
@Princesseuh
Copy link
Member

Repro

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
- P4: important Violate documented behavior or significantly improves performance (priority) feat: tsx Related to the TSX output (scope)
Projects
None yet
Development

No branches or pull requests

3 participants