1import { ExportedConfig, Mod, ModPlatform } from '../Plugin.types'; 2export type BaseModOptions = { 3 /** Officially supports `'ios' | 'android'` (`ModPlatform`). Arbitrary strings are supported for adding out-of-tree platforms. */ 4 platform: ModPlatform & string; 5 mod: string; 6 isProvider?: boolean; 7 skipEmptyMod?: boolean; 8 saveToInternal?: boolean; 9 /** 10 * If the mod supports introspection, and avoids making any filesystem modifications during compilation. 11 * By enabling, this mod, and all of its descendants will be run in introspection mode. 12 * This should only be used for static files like JSON or XML, and not for application files that require regexes, 13 * or complex static files that require other files to be generated like Xcode `.pbxproj`. 14 */ 15 isIntrospective?: boolean; 16}; 17/** 18 * Plugin to intercept execution of a given `mod` with the given `action`. 19 * If an action was already set on the given `config` config for `mod`, then it 20 * will be provided to the `action` as `nextMod` when it's evaluated, otherwise 21 * `nextMod` will be an identity function. 22 * 23 * @param config exported config 24 * @param platform platform to target (ios or android) 25 * @param mod name of the platform function to intercept 26 * @param skipEmptyMod should skip running the action if there is no existing mod to intercept 27 * @param saveToInternal should save the results to `_internal.modResults`, only enable this when the results are pure JSON. 28 * @param isProvider should provide data up to the other mods. 29 * @param action method to run on the mod when the config is compiled 30 */ 31export declare function withBaseMod<T>(config: ExportedConfig, { platform, mod, action, skipEmptyMod, isProvider, isIntrospective, saveToInternal, }: BaseModOptions & { 32 action: Mod<T>; 33}): ExportedConfig; 34/** 35 * Plugin to extend a mod function in the plugins config. 36 * 37 * @param config exported config 38 * @param platform platform to target (ios or android) 39 * @param mod name of the platform function to extend 40 * @param action method to run on the mod when the config is compiled 41 */ 42export declare function withMod<T>(config: ExportedConfig, { platform, mod, action, }: { 43 platform: ModPlatform; 44 mod: string; 45 action: Mod<T>; 46}): ExportedConfig; 47