@@ -32,29 +32,31 @@ declare module 'astro:content' {
3232 ContentEntryMap [ C ]
3333 > [ 'slug' ] ;
3434
35+ /** @deprecated Use `getEntry` instead. */
3536 export function getEntryBySlug <
3637 C extends keyof ContentEntryMap ,
3738 E extends ValidContentEntrySlug < C > | ( string & { } ) ,
3839 > (
3940 collection : C ,
4041 // Note that this has to accept a regular string too, for SSR
41- entrySlug : E
42+ entrySlug : E ,
4243 ) : E extends ValidContentEntrySlug < C >
4344 ? Promise < CollectionEntry < C > >
4445 : Promise < CollectionEntry < C > | undefined > ;
4546
47+ /** @deprecated Use `getEntry` instead. */
4648 export function getDataEntryById < C extends keyof DataEntryMap , E extends keyof DataEntryMap [ C ] > (
4749 collection : C ,
48- entryId : E
50+ entryId : E ,
4951 ) : Promise < CollectionEntry < C > > ;
5052
5153 export function getCollection < C extends keyof AnyEntryMap , E extends CollectionEntry < C > > (
5254 collection : C ,
53- filter ?: ( entry : CollectionEntry < C > ) => entry is E
55+ filter ?: ( entry : CollectionEntry < C > ) => entry is E ,
5456 ) : Promise < E [ ] > ;
5557 export function getCollection < C extends keyof AnyEntryMap > (
5658 collection : C ,
57- filter ?: ( entry : CollectionEntry < C > ) => unknown
59+ filter ?: ( entry : CollectionEntry < C > ) => unknown ,
5860 ) : Promise < CollectionEntry < C > [ ] > ;
5961
6062 export function getEntry <
@@ -80,7 +82,7 @@ declare module 'astro:content' {
8082 E extends ValidContentEntrySlug < C > | ( string & { } ) ,
8183 > (
8284 collection : C ,
83- slug : E
85+ slug : E ,
8486 ) : E extends ValidContentEntrySlug < C >
8587 ? Promise < CollectionEntry < C > >
8688 : Promise < CollectionEntry < C > | undefined > ;
@@ -89,7 +91,7 @@ declare module 'astro:content' {
8991 E extends keyof DataEntryMap [ C ] | ( string & { } ) ,
9092 > (
9193 collection : C ,
92- id : E
94+ id : E ,
9395 ) : E extends keyof DataEntryMap [ C ]
9496 ? Promise < DataEntryMap [ C ] [ E ] >
9597 : Promise < CollectionEntry < C > | undefined > ;
@@ -99,17 +101,17 @@ declare module 'astro:content' {
99101 entries : {
100102 collection : C ;
101103 slug : ValidContentEntrySlug < C > ;
102- } [ ]
104+ } [ ] ,
103105 ) : Promise < CollectionEntry < C > [ ] > ;
104106 export function getEntries < C extends keyof DataEntryMap > (
105107 entries : {
106108 collection : C ;
107109 id : keyof DataEntryMap [ C ] ;
108- } [ ]
110+ } [ ] ,
109111 ) : Promise < CollectionEntry < C > [ ] > ;
110112
111113 export function reference < C extends keyof AnyEntryMap > (
112- collection : C
114+ collection : C ,
113115 ) : import ( 'astro/zod' ) . ZodEffects <
114116 import ( 'astro/zod' ) . ZodString ,
115117 C extends keyof ContentEntryMap
@@ -126,7 +128,7 @@ declare module 'astro:content' {
126128 // if `dev` is not running to update as you edit.
127129 // Invalid collection names will be caught at build time.
128130 export function reference < C extends string > (
129- collection : C
131+ collection : C ,
130132 ) : import ( 'astro/zod' ) . ZodEffects < import ( 'astro/zod' ) . ZodString , never > ;
131133
132134 type ReturnTypeOrOriginal < T > = T extends ( ...args : any [ ] ) => infer R ? R : T ;
0 commit comments