Actions
Task #105365
closedTCA: FormEngineValidation.processValue() does not always use declared return type
Status:
Resolved
Priority:
Should have
Assignee:
-
Category:
Backend JavaScript
Target version:
-
Start date:
2024-10-19
Due date:
% Done:
100%
Estimated time:
TYPO3 Version:
13
PHP Version:
Tags:
Complexity:
Sprint Focus:
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
}
Actions