🐛 BUG: Hoisted exports break as const
& satisfies <type>
#863
Labels
- P2: has workaround
Bug, but has workaround (priority)
as const
& satisfies <type>
#863
What version of
@astrojs/compiler
are you using?2.1.0
What package manager are you using?
pnpm
What operating system are you using?
Windows
Describe the Bug
HoistExports
in//internal/js_scanner/js_scanner.go
fails to account for some TypeScript syntax when lexing.Both of the following exported expressions will be split incorrectly, each resulting in a syntax error:
Here's the compiled output for the following
.astro
source:You can see that
as const satisfies object;
isn't hoisted along with the rest of the exported expression.Link to Minimal Reproducible Example
https://stackblitz.com/edit/github-vlvcmq
The text was updated successfully, but these errors were encountered: