InstructionPlanInput

type InstructionPlanInput = 
  | Instruction
  | InstructionPlan
  | readonly (
  | Instruction
  | InstructionPlan)[];

A flexible input type that can be used to create an InstructionPlan.

This type accepts:

Use the parseInstructionPlanInput function to convert this input into a proper InstructionPlan.

Examples

Using a single instruction.

const input: InstructionPlanInput = myInstruction;

Use as argument type in a function that will parse it into an InstructionPlan.

function myFunction(input: InstructionPlanInput) {
  const plan = parseInstructionPlanInput(input);
  // Use the plan...
}

See

On this page