type WriterFunction = (output: string) => void; export default class Termfx { private commands; private delimiters; private carriageReturn; /** * The constructor initializes the Termfx instance with optional configuration * * @param options Optional configuration object, which can include: * - `delimiters`: An array of two strings that define the delimiters for * variable and function substitution. * - `carriageReturn`: A boolean that indicates whether to add a carriage return */ constructor(options?: { delimiters?: [string, string]; carriageReturn?: boolean; }); /** * Executes the input string by replacing variables and executing functions. * * @param input The input string to be executed * @param writer The function to write the output */ execute(input: string, writer: WriterFunction): Promise; /** * This method allows you to define a custom function that can be invoked * within the input string using the specified name. * * @param name The name of the function to register. This name will be used * to call the function in the input string. * @param func The function to register. It should be a callable function * that performs the desired operation. * @throws {Error} If a function with the same name has already been registered. */ registerFunction(name: string, func: Function): void; /** * This method allows you to register a variable that can be used in the input * * @param name The name of the variable to register. This name will be used * to substitute the variable in the input string. * @param value The value of the variable to register. It should be a string * @throws {Error} If a variable with the same name has already been registered. */ registerVariable(name: string, value: string): void; private validateExecute; } export {};