Entry selector.
type EntriesField<
T extends string = string,
F extends Record<string, any> = Record<string, any>,
> = (EntryReference<T> & F) | (EntryReference<T> & F)[];
type RelatedPosts = EntriesField<"blog", { excerpt: string; featured_image: Asset }>;
// Result: {
// id: string;
// title: string;
// slug: string;
// uri: string;
// api_url: string;
// collection: {
// title: string;
// handle: "blog";
// };
// slugs?: Record<string, string> | null;
// excerpt: string;
// featured_image: Asset;
// } | {
// id: string;
// title: string;
// slug: string;
// uri: string;
// api_url: string;
// collection: {
// title: string;
// handle: "blog";
// };
// slugs?: Record<string, string> | null;
// excerpt: string;
// featured_image: Asset;
// }[]