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: [TSX] Interfaces with properties using generic arguments prevent component props from being typed #699

Closed
Princesseuh opened this issue Jan 13, 2023 · 0 comments · Fixed by #702
Assignees

Comments

@Princesseuh
Copy link
Member

What version of @astrojs/compiler are you using?

^0.31.3

What package manager are you using?

pnpm

What operating system are you using?

macOS

Describe the Bug

As the title says, any interfaces using generic will prevent the proper types from being generated, as such the following component:

---
interface LocalImageProps {
  src: Promise<{ default: string }>;
}

type Props = LocalImageProps;
---

will generate the following signature: export default function Image__AstroComponent_(_props: Record<string, any>): any {}, instead of the proper one that I'd expect: export default function Image__AstroComponent_(_props: Props): any {}

Link to Minimal Reproducible Example

See description

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants