react-native-integrate
Version:
Automate integration of additional code into React Native projects
23 lines (22 loc) • 1.05 kB
TypeScript
import { BlockContentType, ContentModifierType } from '../types/mod.types';
export type FindOrCreateBlockType = (content: string, block: string) => {
blockContent: BlockContentType;
content: string;
};
export type ApplyContentModificationArgType = {
packageName: string;
configPath: string;
content: string;
action: ContentModifierType;
findOrCreateBlock: FindOrCreateBlockType;
indentation: number;
additionalModification?: (args: {
content: string;
blockContent: BlockContentType;
}) => string;
buildComment?: (comment: string) => string[];
};
export declare function applyContentModification(args: ApplyContentModificationArgType): Promise<string>;
export declare function updateBlockContent(blockContent: BlockContentType, rem: number, insert: string, content: string): void;
export declare function getBlockName(action: ContentModifierType): string;
export declare function applyContextReduction(action: ContentModifierType, blockContent: BlockContentType, content: string): string[];