Function buildReplaceNodeContentWithCallbackResultGCM
- buildReplaceNodeContentWithCallbackResultGCM(
findMutationTargetNodes: (match: QueryMatch) => SyntaxNode[],
operatorId: string,
builderParams: { getReplacementTextFromNode: (node: SyntaxNode) => string },
): (
match: QueryMatch,
options?: MutationGenerationOptions,
) => null | CodeMutation Parameters
- findMutationTargetNodes: (match: QueryMatch) => SyntaxNode[]
- operatorId: string
- builderParams: { getReplacementTextFromNode: (node: SyntaxNode) => string }
Builds a MutationOperator.getCodeMutation that replaces the content of the node with the result of a callback called with the node as an argument. It expects MutationOperator.findMutationTargetNodes to return a single node.