import { ParameterDefinition } from '../parameters/parameter-models'; /** * Service in the ParserModule that validates command metadata for the executed command */ export declare class ParametersValidator { /** * Creates a new instance */ constructor(); /** * Validates command metadata ensuring that: * - Indices are sequential starting at 1 * - No names are duplicated * - Optional parameters always come after required * @param definitions Parameter metdata for the executed command * @param commandName name of the exuted command for throwing informative errors */ validate(definitions: ParameterDefinition[], commandName: string): void; /** * Ensures that parameter indices are sequential, starting at 1 * @param definitions Parameter metdata for the executed command * @param commandName name of the exuted command for throwing informative errors */ private isSequential; /** * Ensures that all parameters have distinct names * @param definitions Parameter metdata for the executed command * @param commandName name of the exuted command for throwing informative errors */ private disctintNames; /** * Ensures optional parameters are always after required * @param definitions Parameter metdata for the executed command * @param commandName name of the exuted command for throwing informative errors */ private optionalsAfterRequired; /** * Ensures that an array parameter is the last parameter index * @param definitions Parameter metadata for the executed command * @param commandName name of the executed command for throwing informative errors */ private nothingAfterArrays; /** * Utility function that returns a readable description of the parameter metadata for more informative errors * @param definitions Parameter metadata for the executed command */ private printParameter; }