We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
@nuxt/content
1 parent 5e4a654 commit dd4ff2fCopy full SHA for dd4ff2f
src/content.ts
@@ -5,8 +5,9 @@ export const schema = z.object({
5
robots: z.union([z.string(), z.boolean()]).optional(),
6
})
7
8
-export function asRobotsCollection<T extends Collection<any>>(collection: T): T {
+export function asRobotsCollection<T>(collection: Collection<T>): Collection<T> {
9
if (collection.type === 'page') {
10
+ // @ts-expect-error untyped
11
collection.schema = collection.schema ? schema.extend(collection.schema.shape) : schema
12
}
13
return collection
0 commit comments