We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
astro
2.1.2
None
pnpm
Mac
Chrome
When using union or intersection type definitions on Props the transformation fails. For example:
Props
--- export type Props = { specs: { name: string; }; } & { additional: string; } const { specs, additional } = Astro.props as Props;
Results in Unexpected "&"
Unexpected "&"
Quick Fix:
--- export type Props = ({ specs: { name: string; }; } & { additional: string; }) const { specs, additional } = Astro.props as Props;
Semantically both examples should be the same.
https://stackblitz.com/github/withastro/astro/tree/latest/examples/minimal?file=src/components/Test.astro
The text was updated successfully, but these errors were encountered:
The repro link doesn't look right, but here's a repro based on the description. This seems to be a compiler issue.
Sorry, something went wrong.
Duplicate of #554
natemoo-re
No branches or pull requests
What version of
astro
are you using?2.1.2
Are you using an SSR adapter? If so, which one?
None
What package manager are you using?
pnpm
What operating system are you using?
Mac
What browser are you using?
Chrome
Describe the Bug
When using union or intersection type definitions on
Props
the transformation fails.For example:
Results in
Unexpected "&"
Quick Fix:
Semantically both examples should be the same.
Link to Minimal Reproducible Example
https://stackblitz.com/github/withastro/astro/tree/latest/examples/minimal?file=src/components/Test.astro
Participation
The text was updated successfully, but these errors were encountered: