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

feat(astro): improve astro:content types #9906

Merged

Conversation

florian-lefebvre
Copy link
Member

Changes

Currently, the astro:content module is not typed before astro sync is run, although exported defineCollection and z 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

Copy link

changeset-bot bot commented Jan 31, 2024

🦋 Changeset detected

Latest 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

@github-actions github-actions bot added the pkg: astro Related to the core `astro` package (scope) label Jan 31, 2024
Copy link
Member

@natemoo-re natemoo-re left a 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.

@florian-lefebvre
Copy link
Member Author

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 🙌

Copy link
Member

@natemoo-re natemoo-re left a 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.

.changeset/young-bulldogs-tickle.md Outdated Show resolved Hide resolved
@natemoo-re natemoo-re merged commit 3c0876c into withastro:main Feb 5, 2024
13 checks passed
@astrobot-houston astrobot-houston mentioned this pull request Feb 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pkg: astro Related to the core `astro` package (scope)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants