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:
parent
08042abd07
commit
5fc71ed057
1 changed files with 2 additions and 2 deletions
4
packages/astro/templates/content/types.d.ts
vendored
4
packages/astro/templates/content/types.d.ts
vendored
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue