0
Fork 0
mirror of https://github.com/withastro/astro.git synced 2024-12-16 21:46:22 -05:00

Default typings to string for easier use

This commit is contained in:
Thom van den Akker 2024-12-06 14:24:18 +01:00
parent 08042abd07
commit 5fc71ed057

View file

@ -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;
}