diff --git a/packages/astro/src/virtual-modules/content.ts b/packages/astro/src/virtual-modules/content.ts index c885ebe3368c..a3e9a68289ae 100644 --- a/packages/astro/src/virtual-modules/content.ts +++ b/packages/astro/src/virtual-modules/content.ts @@ -28,9 +28,7 @@ type BaseSchemaWithoutEffects = | z.ZodDiscriminatedUnion | z.ZodIntersection; -type BaseSchema = - | BaseSchemaWithoutEffects - | z.ZodEffects; +type BaseSchema = BaseSchemaWithoutEffects | z.ZodEffects; export type SchemaContext = { image: ImageFunction }; @@ -51,3 +49,27 @@ export function defineCollection( ): CollectionConfig { return _defineCollection(input); } + +const noop: (...args: any[]) => any = () => {}; +/** Run `astro sync` to generate high fidelity types */ +export const getEntryBySlug = noop; +/** Run `astro sync` to generate high fidelity types */ +export const getDataEntryById = noop; +/** Run `astro sync` to generate high fidelity types */ +export const getCollection = noop; +/** Run `astro sync` to generate high fidelity types */ +export const getEntry = noop; +/** Run `astro sync` to generate high fidelity types */ +export const getEntries = noop; +/** Run `astro sync` to generate high fidelity types */ +export const reference = noop; +/** Run `astro sync` to generate high fidelity types */ +export type CollectionKey = any; +/** Run `astro sync` to generate high fidelity types */ +export type CollectionEntry = any; +/** Run `astro sync` to generate high fidelity types */ +export type ContentCollectionKey = any; +/** Run `astro sync` to generate high fidelity types */ +export type DataCollectionKey = any; +/** Run `astro sync` to generate high fidelity types */ +export type ContentConfig = any;