import { t as ApiSnapshotOptions } from "./types-BElY5l7P.mjs"; //#region src/vitest.d.ts interface SnapshotApiOptions extends Pick { /** * Snapshot output directory, relative to the test file. * @default '__snapshots__/tsnapi' */ outputDir?: string; } interface PackageContext { cwd: string; workspaceRoot: string; packageRoot: string; packageName: string; /** Snapshot output directory, relative to the test file. Defaults from options or `'__snapshots__/tsnapi'`. */ outputDir: string; } interface DescribePackagesApiSnapshotsOptions extends SnapshotApiOptions { /** * Package directories as absolute paths. * When omitted, auto-discovers from pnpm-workspace.yaml or package.json workspaces. */ packages?: string[]; /** * Working directory for workspace discovery. * @default process.cwd() */ cwd?: string; /** * Called for each discovered package. * Mutate `ctx` to customize the describe block name, snapshot output directory, etc. * Return `false` to skip the package entirely. * @example * ```ts * filter(ctx) { * // Strip org scope from describe name * ctx.packageName = ctx.packageName.replace(/^@.*\//, '') * } * ``` */ filter?: (ctx: PackageContext) => boolean | void; /** * Hook called inside each package's `describe` block via Vitest's `beforeEach`. * Receives the (possibly mutated) package context. */ beforeEach?: (ctx: PackageContext) => void | Promise; /** * Hook called inside each package's `describe` block via Vitest's `afterEach`. * Receives the (possibly mutated) package context. */ afterEach?: (ctx: PackageContext) => void | Promise; } /** * Create `it()` blocks for each entry point of a package, * asserting runtime and DTS snapshots via `toMatchFileSnapshot`. * * Entry names are resolved from `package.json` at registration time * using synchronous I/O (vitest's `describe` does not support async callbacks). * Dist files are read lazily inside each `it()` block, * so `beforeAll` hooks can build the package first. */ declare function snapshotApiPerEntry(cwd: string, options?: SnapshotApiOptions): void; /** * Create `describe()` blocks for each package in a monorepo, * each containing `snapshotApiPerEntry`. * * Auto-discovers packages from `pnpm-workspace.yaml` or `package.json` workspaces * when `packages` is omitted. */ declare function describePackagesApiSnapshots(options?: DescribePackagesApiSnapshotsOptions): void; //#endregion export { DescribePackagesApiSnapshotsOptions, PackageContext, SnapshotApiOptions, describePackagesApiSnapshots, snapshotApiPerEntry };