Skip to content

Commit

Permalink
fix: add render() to stub content type defs (#12884)
Browse files Browse the repository at this point in the history
* fix: add render() to stub content type defs

* Better wording
  • Loading branch information
ascorbic authored Jan 3, 2025
1 parent 6bbb3f5 commit d7e97a7
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 11 deletions.
5 changes: 5 additions & 0 deletions .changeset/strange-carpets-drop.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'astro': patch
---

Adds `render()` to stub content types
24 changes: 13 additions & 11 deletions packages/astro/types/content.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,27 +89,29 @@ declare module 'astro:content' {
input: CollectionConfig<S>,
): CollectionConfig<S>;

/** 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<C> = 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;
}

0 comments on commit d7e97a7

Please sign in to comment.