declare class Chain { private readonly value; /** * Initializes the chain with an initial value. * @param initialValue - The initial value of the chain. * @throws Error if the input is not a number. */ constructor(initialValue: number); /** * Adds a number to the current value. * @param num - The number to add. * @returns A new `Chain` instance with the updated value. * @throws Error if the input is not a number. */ add(num: number): Chain; /** * Subtracts a number from the current value. * @param num - The number to subtract. * @returns A new `Chain` instance with the updated value. * @throws Error if the input is not a number. */ subtract(num: number): Chain; /** * Multiplies the current value by a number. * @param num - The number to multiply by. * @returns A new `Chain` instance with the updated value. * @throws Error if the input is not a number. */ multiply(num: number): Chain; /** * Divides the current value by a number. * @param num - The divisor. * @returns A new `Chain` instance with the updated value. * @throws Error if the input is not a number or if dividing by zero. */ divide(num: number): Chain; /** * Gets the result of the chain. * @returns The current value of the chain. */ /** * Raises the current value to a specified power. * @param exponent - The power to raise the value to. * @returns A new `Chain` instance with the updated value. */ power(exponent: number): Chain; /** * Finds the nth root of the current value. * @param root - The degree of the root. * @returns A new `Chain` instance with the updated value. * @throws Error if the root is zero. */ root(root: number): Chain; getResult(): number; /** * Validates if a value is a number. * @param value - The value to validate. * @returns True if the value is a number, otherwise false. */ private static isNumber; /** * Validates the input for a specific operation. * @param num - The input number. * @param operation - The name of the operation being performed. * @throws Error if the input is not a number. */ private validateNumber; } export { Chain };