1import { ConfigPlugin, ExportedConfig, ExportedConfigWithProps, ModPlatform } from '../Plugin.types'; 2import { BaseModOptions } from './withMod'; 3export type ForwardedBaseModOptions = Partial<Pick<BaseModOptions, 'saveToInternal' | 'skipEmptyMod'>>; 4export type BaseModProviderMethods<ModType, Props extends ForwardedBaseModOptions = ForwardedBaseModOptions> = { 5 getFilePath: (config: ExportedConfigWithProps<ModType>, props: Props) => Promise<string> | string; 6 read: (filePath: string, config: ExportedConfigWithProps<ModType>, props: Props) => Promise<ModType> | ModType; 7 write: (filePath: string, config: ExportedConfigWithProps<ModType>, props: Props) => Promise<void> | void; 8 /** 9 * If the mod supports introspection, and avoids making any filesystem modifications during compilation. 10 * By enabling, this mod, and all of its descendants will be run in introspection mode. 11 * This should only be used for static files like JSON or XML, and not for application files that require regexes, 12 * or complex static files that require other files to be generated like Xcode `.pbxproj`. 13 */ 14 isIntrospective?: boolean; 15}; 16export type CreateBaseModProps<ModType, Props extends ForwardedBaseModOptions = ForwardedBaseModOptions> = { 17 methodName: string; 18 platform: ModPlatform; 19 modName: string; 20} & BaseModProviderMethods<ModType, Props>; 21export declare function createBaseMod<ModType, Props extends ForwardedBaseModOptions = ForwardedBaseModOptions>({ methodName, platform, modName, getFilePath, read, write, isIntrospective, }: CreateBaseModProps<ModType, Props>): ConfigPlugin<Props | void>; 22export declare function assertModResults(results: any, platformName: string, modName: string): any; 23export declare function createPlatformBaseMod<ModType, Props extends ForwardedBaseModOptions = ForwardedBaseModOptions>({ modName, ...props }: Omit<CreateBaseModProps<ModType, Props>, 'methodName'>): ConfigPlugin<void | Props>; 24/** A TS wrapper for creating provides */ 25export declare function provider<ModType, Props extends ForwardedBaseModOptions = ForwardedBaseModOptions>(props: BaseModProviderMethods<ModType, Props>): BaseModProviderMethods<ModType, Props>; 26/** Plugin to create and append base mods from file providers */ 27export declare function withGeneratedBaseMods<ModName extends string>(config: ExportedConfig, { platform, providers, ...props }: ForwardedBaseModOptions & { 28 platform: ModPlatform; 29 providers: Partial<Record<ModName, BaseModProviderMethods<any, any>>>; 30}): ExportedConfig; 31