export function generateIR()

in src/helpers/generator.ts [35:50]


export function generateIR(steps: Steps): Steps {
  const result: Steps = [];
  const actions: ActionInContext[] = [];
  for (const step of steps) {
    for (const actionContext of step.actions) {
      const { action, title } = actionContext;
      // Add title to all actionContexts
      actions.push(title ? actionContext : { ...actionContext, title: actionTitle(action) });
    }
    if (actions.length > 0) {
      result.push({ actions, name: step.name });
    }
  }

  return result;
}