Function createInteractiveMenu

  • Helper to create an interactive menu using Inquirer. Therefore definition of the menu is required. Once, a choice is selected -> the provided callback is called.

    Normally, in the menu, a 'back' item is added to go back to the upper menu. Additionally the user gets an 'exit' option to leave the app.

    Parameters

    • menu: TMenuDefinition

      The menu which should be rendered

    • options: {
          addExit?: boolean;
          exitCallback?: (() => Promise<void>);
      } = {}

      Options to control the behavior of the exit-entry etc.

      • Optional addExit?: boolean
      • Optional exitCallback?: (() => Promise<void>)
          • (): Promise<void>
          • Returns Promise<void>

    Returns Promise<void>

Generated using TypeDoc