/** * Copies a whole other file. Useful for "borrowing" an implementation of a simple utility from another project, without needing to publish it. * Obviously this creates duplicated code, so use judiciously! * * ##### basic usage * ```js * // codegen:start {preset: copy, source: ../../another-project/src/some-file.ts} * import {z} from 'zod' * * export const MyObject = z.object({foo: z.string()}) * // codegen:end * ``` * * #### excludeLines * * ```ts * import {z} from 'zod/v4' // in this project we use zod v4, but we're copying from a project that uses zod v3 * // codegen:start {preset: copy, source: ../../another-project/src/some-file.ts, excludeLines: ['^import']} * * export const MyObject = z.object({foo: z.string()}) * // codegen:end * ``` * * #### onlyIfExists * ```js * // copy a file from a sibling project, but only if the sibling project actually exists * // in this case this will effectively skip the copying step on machines that don't have the sibling project installed * // e.g. on CI runners. * // codegen:start {preset: copy, source: ../../another-project/src/some-file.ts, onlyIfExists: ../../another-project/package.json} * import {z} from 'zod' * * export const MyObject = z.object({foo: z.string()}) * // codegen:end * ``` * * #### comparison * ```js * // by default, the content will perform a "simplified" comparison with existing content, so differences from tools like prettier * // are ignored. if you care about whitespace and similar differences, you can set the comparison option to `strict`. * // codegen:start {preset: copy, source: ../../another-project/src/some-file.ts, comparison: strict} * import {z} from 'zod' * * export const MyObject = z.object({foo: z.string()}) * // codegen:end * ``` */ export declare const copy: import(".").Preset<{ source: string; onlyIfExists?: string | undefined; excludeLines?: string[] | undefined; comparison?: "simplified" | "strict" | undefined; }>;