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.6.3
Vercel
pnpm
Mac and Linux
N/A
One of my components was importing a type from another Astro component's Props, but that stopped working since at least 2.4.0.
Props
// ComponentA.astro import type { Props as ComponentBProps } from './ComponentB.astro'
❯ npm run astro check > @example/[email protected] astro > astro check 05:11:05 PM [check] Checking files 05:11:06 PM [content] No content directory found. Skipping type generation. ✔ Getting diagnostics for Astro files in /home/projects/github-2auewc/… 05:11:06 PM [diagnostics] /home/projects/github-2auewc/src/pages/ComponentA.astro:1:1 Error: Cannot find name 'Props'. 01 --- 02 import type { Props as ComponentBProps } from './ComponentB.astro' 05:11:06 PM [diagnostics] Result (3 files): - 1 error - 0 warnings - 0 hints
https://stackblitz.com/edit/github-2auewc?file=src%2Fpages%2FComponentA.astro,src%2Fpages%2FComponentB.astro&on=stackblitz
The text was updated successfully, but these errors were encountered:
While working on withastro/astro#7430, I found this is caused by @astrojs/compiler v1.5.1, where v1.5.0 works for me.
@astrojs/compiler
Sorry, something went wrong.
Thanks for opening this! I'm looking into what happened on the compiler side that caused this. Hoping to get a fix out shortly.
fix(#814): improve Props import detection
89fdeef
fix(#814): improve Props import detection (#817)
4aba173
Successfully merging a pull request may close this issue.
What version of
astro
are you using?2.6.3
Are you using an SSR adapter? If so, which one?
Vercel
What package manager are you using?
pnpm
What operating system are you using?
Mac and Linux
What browser are you using?
N/A
Describe the Bug
One of my components was importing a type from another Astro component's
Props
, but that stopped working since at least 2.4.0.Link to Minimal Reproducible Example
https://stackblitz.com/edit/github-2auewc?file=src%2Fpages%2FComponentA.astro,src%2Fpages%2FComponentB.astro&on=stackblitz
Participation
The text was updated successfully, but these errors were encountered: