import { CommandDescription } from '../command/command-models'; import { ModuleDescription } from '../module/module-models'; import { OptionDescription } from '../options/option-models'; import { ParameterDescription } from '../parameters/parameter-models'; /** * Injectable service with utility functions that assist with printing help messages * * @publicApi */ export declare class HelpUtilities { /** * Creates a new instance */ constructor(); /** * Returns a description of a module in a single line, without details of its commands * @param description Description of the module, including references to its commands and parent modules */ singleLineModule(description: ModuleDescription): string; /** * Returns a description of a module in a single line, without details of its options and parameters. It provides an optional * setting to include the option names in the line * @param command Description of the command * @param dontExpandOpts Whether each option should be printed with its name else it will be printed as [options] */ singleLineCommand(command: CommandDescription, dontExpandOpts: boolean): string; /** * Returns the descriptions of all parent modules for a particular module or command * @param description Description of the command or module */ private parents; /** * Prints a table with equal tabs for columns * @param textMatrix Table to print as a two dimensional array * @param maxLengths Maximum character length for a column, after which the text is wrapped */ table(textMatrix: string[][], maxLengths?: number[]): string; /** * Modifies a two dimensional table matrix and inserts new rows for columns that exceed the maximum number of characters * @param textMatrix Original table matrix * @param maxLengths Maximum character length for a column, after which the text is wrapped */ private applyMaxColumnLengths; /** * Splits a column up into multiple rows to wrap the column's text * @param text text to split * @param maxLength Maximum number of characters per column before text-wrapping is applied */ private splitTextForTable; /** * Returns a description of the parameters for a particular command, including descriptions * @param parameters Descriptions of the command's parameters */ commandParameters(parameters: ParameterDescription[]): string; /** * Returns a description of the options for a particular command, including descriptions * @param options Descriptions of the command's options */ commandOptions(options: OptionDescription[]): string; /** * Prints a description for all commands in a module * @param commands Descriptions of the module's commands * @param subCommands Descriptions of the module's subcommands */ moduleCommands(commands: CommandDescription[], subCommands: ModuleDescription[]): string; }