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

Type generation during astro check doesn't include local collection #126

Open
charlie-hadden opened this issue Jul 7, 2023 · 3 comments
Labels
bug Something isn't working
Milestone

Comments

@charlie-hadden
Copy link

This is another one on v1. It seems that the type generation that runs during astro check doesn't include local collections. In my case I'm only using a local collection, so that means the icon type gets gets generated as export type Icon = never;. For now I've removed the /// <reference path="../.astro/icon.d.ts" /> but that obviously also means removing some type-safety. I'm afraid I'm not familiar enough with vite plugins to be able to submit a PR for this, but if a reproduction would be helpful then I can put something together for that.

Thanks

@stramel stramel added the bug Something isn't working label Jul 10, 2023
@stramel stramel added this to the v1 milestone Jul 10, 2023
@stramel
Copy link
Collaborator

stramel commented Jul 10, 2023

Thank you for filing this issue! It seems like this is a regression in the type generation. I will get a fix in for this! If you can submit a reproduction that would be awesome! I was able to run locally and not have issues. I did have to reload my vscode window though.

@charlie-hadden
Copy link
Author

Sure thing - I'll get a reproduction put together for you shortly.

@charlie-hadden
Copy link
Author

I've put together a small reproduction of this issue here: https://github.com/charlie-hadden/astro-icon-reproduction

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants