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

🐛 BUG: Using a property as a dynamic tag marks TS props as unused #972

Open
crutchcorn opened this issue Oct 19, 2024 · 0 comments
Open
Labels
needs triage Issue needs to be triaged

Comments

@crutchcorn
Copy link

Describe the Bug

When using code like this:

---
interface Props {
  as: string;
}

const { as } = Astro.props;
const As = as;
---

<As>
  <slot />
</As>

And running pnpm astro check it shows an error:

error ts(6196): 'Props' is declared but never used.

Steps to Reproduce

  1. npm init astro using template
  2. Use the code above in a component
  3. Run pnpm astro check
  4. Error! error ts(6196): 'Props' is declared but never used.

Link to Minimal Reproducible Example

https://stackblitz.com/edit/astro-check-errors?file=src%2Fcomponents%2FCard.astro&on=stackblitz

@github-actions github-actions bot added the needs triage Issue needs to be triaged label Oct 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs triage Issue needs to be triaged
Projects
None yet
Development

No branches or pull requests

1 participant