Type Alias: DocumentOf
type DocumentOf<TName extends CollectionName = CollectionName> = TName extends unknown ? Source : never;Defined in: content.ts:40
A document in the named collection, or in any collection. The generated types give its metadata and body the types from your config.
Example
function title(post: DocumentOf<"posts">) {
return post.metadata.title;
}