Skip to content

Commit

Permalink
Default typings to string for easier use
Browse files Browse the repository at this point in the history
  • Loading branch information
Thodor12 committed Dec 6, 2024
1 parent 08042ab commit 5fc71ed
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/astro/templates/content/types.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@ declare module 'astro:content' {
ContentEntryMap[C]
>['slug'];

export type ReferenceDataEntry<C extends CollectionKey, E extends keyof DataEntryMap[C]> = {
export type ReferenceDataEntry<C extends CollectionKey, E extends keyof DataEntryMap[C] = string> = {
collection: C;
id: E;
}
export type ReferenceContentEntry<C extends keyof ContentEntryMap, E extends ValidContentEntrySlug<C> | (string & {})> = {
export type ReferenceContentEntry<C extends keyof ContentEntryMap, E extends ValidContentEntrySlug<C> | (string & {}) = string> = {
collection: C;
slug: E;
}
Expand Down

0 comments on commit 5fc71ed

Please sign in to comment.