import type { Arrayable, Awaitable } from '@antfu/utils' import type { DumpOptions } from 'js-yaml' export interface Context { filePath: string files: string[] } export type Config = ({ include: Arrayable exclude?: Arrayable } & ( | { type: 'text' contents?: (text: string | null, context: Context) => Awaitable } | { type: 'json' contents?: (data: any, context: Context) => Awaitable } | { type: 'yaml' contents?: (data: any, context: Context) => Awaitable dumpOptions?: DumpOptions } ))[]