🐛 The bug
Description
The documentation at https://nuxtseo.com/docs/robots/guides/content suggests that asRobotsCollection() should work without requiring a schema, but TypeScript throws an error when schema is omitted.
Actual Behavior
TypeScript error: Argument of type 'Collection<unknown>' is not assignable to parameter of type
'Collection<ZodRawShape>'
🛠️ To reproduce
🌈 Expected behavior
Based on the docs, this should work:
asRobotsCollection({
type: "page",
source: "1.docs/**/*",
})
ℹ️ Additional context
Environment
- @nuxtjs/robots: 5.5.5
- @nuxt/content: 3.6.3
- Nuxt: 4.1.0
Workaround
Adding empty schema: schema: z.object({})