1
- import type { Collections , PageCollections , CollectionQueryBuilder , SurroundOptions , SQLOperator , QueryGroupFunction } from '@nuxt/content'
1
+ import type { Collections , PageCollections , CollectionQueryBuilder , SurroundOptions , SQLOperator , QueryGroupFunction , ContentNavigationItem } from '@nuxt/content'
2
2
import type { H3Event } from 'h3'
3
3
import { collectionQueryBuilder } from './internal/query'
4
4
import { generateNavigationTree } from './internal/navigation'
@@ -19,11 +19,11 @@ export const queryCollection = <T extends keyof Collections>(collection: T): Col
19
19
return collectionQueryBuilder < T > ( collection , ( collection , sql ) => executeContentQuery ( event , collection , sql ) )
20
20
}
21
21
22
- export function queryCollectionNavigation < T extends keyof PageCollections > ( collection : T , fields ?: Array < keyof PageCollections [ T ] > ) {
22
+ export function queryCollectionNavigation < T extends keyof PageCollections > ( collection : T , fields ?: Array < keyof PageCollections [ T ] > ) : ChainablePromise < T , ContentNavigationItem [ ] > {
23
23
return chainablePromise ( collection , qb => generateNavigationTree ( qb , fields ) )
24
24
}
25
25
26
- export function queryCollectionItemSurroundings < T extends keyof PageCollections > ( collection : T , path : string , opts ?: SurroundOptions < keyof PageCollections [ T ] > ) {
26
+ export function queryCollectionItemSurroundings < T extends keyof PageCollections > ( collection : T , path : string , opts ?: SurroundOptions < keyof PageCollections [ T ] > ) : ChainablePromise < T , ContentNavigationItem [ ] > {
27
27
return chainablePromise ( collection , qb => generateItemSurround ( qb , path , opts ) )
28
28
}
29
29
0 commit comments