From d7e97a775dda7a851bfc10b06161f9a1d3631ed3 Mon Sep 17 00:00:00 2001 From: Matt Kane Date: Fri, 3 Jan 2025 12:01:33 +0000 Subject: [PATCH] fix: add render() to stub content type defs (#12884) * fix: add render() to stub content type defs * Better wording --- .changeset/strange-carpets-drop.md | 5 +++++ packages/astro/types/content.d.ts | 24 +++++++++++++----------- 2 files changed, 18 insertions(+), 11 deletions(-) create mode 100644 .changeset/strange-carpets-drop.md diff --git a/.changeset/strange-carpets-drop.md b/.changeset/strange-carpets-drop.md new file mode 100644 index 0000000000..7f2e7861c6 --- /dev/null +++ b/.changeset/strange-carpets-drop.md @@ -0,0 +1,5 @@ +--- +'astro': patch +--- + +Adds `render()` to stub content types diff --git a/packages/astro/types/content.d.ts b/packages/astro/types/content.d.ts index 38e9158f0e..c40d867a40 100644 --- a/packages/astro/types/content.d.ts +++ b/packages/astro/types/content.d.ts @@ -89,27 +89,29 @@ declare module 'astro:content' { input: CollectionConfig, ): CollectionConfig; - /** Run `astro sync` to generate high fidelity types */ + /** Run `astro dev` or `astro sync` to generate high fidelity types */ export const getEntryBySlug: (...args: any[]) => any; - /** Run `astro sync` to generate high fidelity types */ + /** Run `astro dev` or `astro sync` to generate high fidelity types */ export const getDataEntryById: (...args: any[]) => any; - /** Run `astro sync` to generate high fidelity types */ + /** Run `astro dev` or `astro sync` to generate high fidelity types */ export const getCollection: (...args: any[]) => any; - /** Run `astro sync` to generate high fidelity types */ + /** Run `astro dev` or `astro sync` to generate high fidelity types */ export const getEntry: (...args: any[]) => any; - /** Run `astro sync` to generate high fidelity types */ + /** Run `astro dev` or `astro sync` to generate high fidelity types */ export const getEntries: (...args: any[]) => any; - /** Run `astro sync` to generate high fidelity types */ + /** Run `astro dev` or `astro sync` to generate high fidelity types */ export const reference: (...args: any[]) => any; - /** Run `astro sync` to generate high fidelity types */ + /** Run `astro dev` or `astro sync` to generate high fidelity types */ export type CollectionKey = any; - /** Run `astro sync` to generate high fidelity types */ + /** Run `astro dev` or `astro sync` to generate high fidelity types */ // biome-ignore lint/correctness/noUnusedVariables: stub generic type to match generated type export type CollectionEntry = any; - /** Run `astro sync` to generate high fidelity types */ + /** Run `astro dev` or `astro sync` to generate high fidelity types */ export type ContentCollectionKey = any; - /** Run `astro sync` to generate high fidelity types */ + /** Run `astro dev` or `astro sync` to generate high fidelity types */ export type DataCollectionKey = any; - /** Run `astro sync` to generate high fidelity types */ + /** Run `astro dev` or `astro sync` to generate high fidelity types */ export type ContentConfig = any; + /** Run `astro dev` or `astro sync` to generate high fidelity types */ + export const render: (entry: any) => any; }