import type fs from 'node:fs' export interface MarkdownFile { filepath: string relativePath: string content: string createTime: Date stats: fs.Stats } export type FrontmatterFn = ( value: T, file: MarkdownFile, data: K ) => T | PromiseLike export type FrontmatterObject = Record>; export type FrontmatterArray = { include: string | string[] frontmatter: FrontmatterObject }[] export interface AutoFrontmatterOptions { /** * FilterPattern */ include?: string | string[] exclude?: string | string[] /** * { * key(value, file, data) { * return value * } * } */ frontmatter?: FrontmatterArray | FrontmatterObject }