feat: added types to allow the creation of user space content services#7607
Merged
Princesseuh merged 5 commits intowithastro:mainfrom Sep 13, 2023
FineWolf:feature/collection-name-type
Merged
feat: added types to allow the creation of user space content services#7607Princesseuh merged 5 commits intowithastro:mainfrom FineWolf:feature/collection-name-type
Princesseuh merged 5 commits intowithastro:mainfrom
FineWolf:feature/collection-name-type
Conversation
🦋 Changeset detectedLatest commit: 31cb628 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 |
Member
|
Since we don't have a documentation page of this kind of stuff, we could use a changelog to show the usage of these new types. |
Princesseuh
approved these changes
Sep 13, 2023
Merged
ArmandPhilippot
added a commit
to ArmandPhilippot/astro-docs
that referenced
this pull request
Jul 29, 2024
* See withastro/astro#7607 for the most recent exported types * See withastro/astro#6850 for `reference()` * See `packages/astro/types/content.d.ts` for `schema` type (might need a refactor) * `getDataEntryById` is missing but since `getEntryBySlug` is announced as deprecated I don't know if we should add it (so no change here)
ArmandPhilippot
added a commit
to ArmandPhilippot/astro-docs
that referenced
this pull request
Jul 29, 2024
* See withastro/astro#7607 for the most recent exported types * See withastro/astro#6850 for `reference()` * See `packages/astro/types/content.d.ts` for `schema` type (might need a refactor) * `getDataEntryById` is missing but since `getEntryBySlug` is announced as deprecated I don't know if we should add it (so no change here)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes
astro:contentin order to allow user spaces services to effectively type content services.CollectionKeyallows to target the name of all collectionsContentCollectionKeyallows to target the name of content collectionsDataCollectionKeyallows to target the name of data collectionsThere is currently no way to cleanly
infera type that is equivalent tokeyof AnyEntryMapin user space. This PR aims to rectify that.Testing
This is a typing change, no test is currently present to check the generated typings.
Docs
The documentation doesn't currently cover the typings of
astro:content.