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

💡 RFC: Infer types from getStaticPaths in appropriate contexts #453

Closed
1 of 3 tasks
Princesseuh opened this issue Nov 29, 2022 · 1 comment
Closed
1 of 3 tasks
Labels
ecosystem: compiler Issue is caused by a bug in the Astro compiler

Comments

@Princesseuh
Copy link
Member

Background & Motivation

When getStaticPaths is present, we can infer the type for Astro.props and Astro.params from it. We can do this automatically, much like we type Astro.props according to interface Props at the moment.

Proposed Solution

Possible solutions

See this part of the compiler for how this works at the moment for Props. A similar solution could be implemented

Alternatives considered

N/A

Risks, downsides, and/or tradeoffs

N/A

Open Questions

N/A

Detailed Design

No response

Help make it happen!

  • I am willing to submit a PR to implement this change.
  • I am willing to submit a PR to implement this change, but would need some guidance.
  • I am not willing to submit a PR to implement this change.
@Princesseuh Princesseuh added the ecosystem: compiler Issue is caused by a bug in the Astro compiler label May 8, 2023
@Princesseuh
Copy link
Member Author

Closed by withastro/compiler#873

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ecosystem: compiler Issue is caused by a bug in the Astro compiler
Projects
None yet
Development

No branches or pull requests

1 participant