UNPKG

@aziontech/opennextjs-azion

Version:
13 lines (12 loc) 669 B
/** * Applies multiple code patches in order to a given piece of code, at each step it validates that the code * has actually been patched/changed, if not an error is thrown * * @param code the code to apply the patches to * @param patches array of tuples, containing a string indicating the target of the patching (for logging) and * a patching function that takes a string (pre-patch code) and returns a string (post-patch code) * @returns the patched code */ export declare function patchCodeWithValidations(code: string, patches: [string, (code: string) => string | Promise<string>, opts?: { isOptional?: boolean; }][]): Promise<string>;