Issue Task Closed

#105365TCA: FormEngineValidation.processValue() does not always use declared return type

Ayke Halder 10/19/24, 19:49 updated 12/02/25, 14:32

Description

FormEngineValidation.processValue with argument 'integer' actually returns number instead of string:

FormEngineValidation.processValue = function(…): string {}

FormEngineValidation.processValue('integer', …) {
  return … someValue as number
}

Call-chain – the return type of these functions is declared as string:

FormEngineValidation.updateInputField = function(…): void {
  (someField as HTMLInputElement).value: string = FormEngineValidation.processByEvals(…) as number
}

FormEngineValidation.processByEvals = function(…): string {
  return … FormEngineValidation.processValue(…) as number
}

FormEngineValidation.processValue = function(…): string {
  return … someValue as number
}

Reviews 5