import { ASTPath, CallExpression, JSCodeshift, MemberExpression } from 'jscodeshift'; import { Details, UIConfig } from '../types/runner'; import { Operation } from '../types/transformer'; /** * Creates and returns the `registerComponent` and `registerWrapper` MemberExpression AST node * along with the arguments to be passed to the final CallExpression and the details to be updated * in UI Config snippet * @param operation add/replace/wrapper * @param componentKey Unique key for the custom component * @param customComponentHint Dynamic Component * @param args Arguments passed to the Dynamic Component APIs * @param flexVariable Flex instance variable * @param j JSCodeshift core */ export declare const toRegisterComponent: (operation: string, componentKey: string, customComponentHint: string, args: any[], flexVariable: string, j: JSCodeshift) => { memberExpression?: MemberExpression | undefined; args?: any[] | undefined; details?: Details | undefined; }; /** * Creates and returns the `registerRemove` MemberExpression AST node * along with the arguments to be passed to the final CallExpression and the details to be updated * in UI Config snippet * @param componentKey Unique key for the custom component * @param customComponentHint Dynamic Component * @param args Arguments passed to the Dynamic Component APIs * @param flexVariable Flex instance variable * @param j JSCodeshift core */ export declare const toRegisterRemove: (componentKey: string, customComponentHint: string, args: any[], flexVariable: string, j: JSCodeshift) => { memberExpression?: MemberExpression | undefined; args?: any[] | undefined; details?: Details | undefined; }; /** * Creates and updates UIConfig snippet * @param uiConfig Initial UIConfig snippet * @param componentHint Dynamic Component * @param operation Dynamic Component API * @param details Properties of the custom component to be updated in the UI Config snippet */ export declare const updateUIConfig: (uiConfig: UIConfig, componentHint: string, operation: Operation, details?: Details) => void; /** * Replaces the CallExpression node paths with the new Register MemeberExpression and updated arguments * @param operation Dynamic Component API * @param uiConfig UI Config Snippet * @param componentKey Unique key for the custom component * @param componentHint Dynamic Component name * @param orginalArgs Original arguments passed to Dynamic component API * @param flexVariable Flex instance variable * @param expr CallExpression whose node paths will be replaced * @param j JSCodeshift * @param shouldAddComment Flag to add auto-generated comment */ export declare const modifyAST: (operation: Operation, uiConfig: UIConfig, componentKey: string, componentHint: string, orginalArgs: any[], flexVariable: string, expr: ASTPath, j: JSCodeshift, shouldAddComment?: boolean) => void;