-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
feat(astro): improve astro:content
types
#9906
feat(astro): improve astro:content
types
#9906
Conversation
🦋 Changeset detectedLatest commit: 02e47d0 The changes in this PR will be included in the next version bump. Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
…florian-lefebvre/astro into feat/content-types-improvements
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is so great! Thanks for submitting a PR, I know we talked about this a while ago.
Yeah it was on my todo but I was a bit scared of it ngl! Hopefully arsh was here to save me on the weird TS bits 🙌 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks amazing! Thanks again.
Changes
Currently, the
astro:content
module is not typed beforeastro sync
is run, although exporteddefineCollection
andz
do not depend on codegen. This PR moves them from types template to a "static" virtual module type declaration.Testing
Manually in the
blog
example. Tests should still pass.Docs
I think parts of the docs will need to be updated, I'm thinking about the tutorial. Basically reverting this https://github.com/withastro/docs/pull/6272/files#diff-ec9625e9b89360bd7a29d0d392017cbb704e8890a12534044ca2374dddb9fdb5R181