import type { TransformError, TransformOptions, TransformResult, TransformWarning } from './types.js'; /** * Result of transforming a code string. */ export interface CodeTransformResult { /** The transformed code */ code: string; /** Errors that occurred during transformation */ errors: TransformError[]; /** Number of transformations applied */ transformCount: number; /** Warnings for manual review */ warnings: TransformWarning[]; } /** * Transform a code string from Chai to bupkis assertions. * * This function handles both BDD (expect/should) and TDD (assert) styles. * * @example * * ```ts * import { transformCode } from '@bupkis/from-chai'; * * const { code } = await transformCode(` * import { expect } from 'chai'; * expect(foo).to.equal(bar); * `); * // code: "import { expect } from 'bupkis';\nexpect(foo, 'to be', bar);" * ``` * * @function * @param code - The source code to transform * @param options - Transform options * @returns The transformed code and metadata */ export declare const transformCode: (code: string, options?: { mode?: TransformOptions["mode"]; }) => Promise; /** * Transform files matching glob patterns from Chai to bupkis assertions. * * @example * * ```ts * import { transform } from '@bupkis/from-chai'; * * const result = await transform({ * include: ['**\/*.test.ts'], * mode: 'best-effort', * write: true, * }); * * console.log(`Transformed ${result.totalTransformations} assertions`); * ``` * * @function * @param options - Transform options including file patterns and mode * @returns Results including per-file details and summary statistics */ export declare const transform: (options?: TransformOptions) => Promise; //# sourceMappingURL=transform.d.ts.map