import type { StandardSchemaV1 } from './standard-schema.ts'; /** A function that validates and returns a specific type. */ type BivariantCallback = { bivarianceHack(...args: Args): Return; }['bivarianceHack']; /** A function that validates and returns a specific type. */ export type ModuleExportValidator, Output = Input> = BivariantCallback<[value: Input], Output>; /** * Directory-level schema configuration. * * - A Standard Schema validates the *module object* (e.g. `z.object({ frontmatter: ... })`). * - A schema map validates *individual exports* (e.g. `{ frontmatter: z.object(...) }`). * - Both forms can also be provided per extension via `{ mdx: ..., ts: ... }`. */ export type DirectorySchemaOption = StandardSchemaV1 | Record; export type DirectorySchema = DirectorySchemaOption | Partial>; export declare function isStandardSchema(value: unknown): value is StandardSchemaV1; export declare function resolveDirectorySchemaOption(schema: DirectorySchema | undefined, extension: string | undefined): DirectorySchemaOption | undefined; export declare function validateExportValueWithExportSchemaMap(schemaMap: Record>, name: string, value: unknown, filePath: string): any; export declare function applyModuleSchemaToModule(schema: StandardSchemaV1, moduleValue: any, filePath: string): any; export {};