๐ BUG: Using a property as a dynamic tag marks TS props as unused
Closed this issue ยท 1 comments
crutchcorn commented
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
npm init astro
using template- Use the code above in a component
- Run
pnpm astro check
- 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
Princesseuh commented
Duplicate of withastro/compiler#927