Project

General

Profile

Actions

Task #105365

closed

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

Added by Ayke Halder 12 days ago. Updated 1 day ago.

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
}

Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Task #105366: Introduce type for @typo3/backend/form-engine-validationResolved2024-10-19

Actions
Actions

Also available in: Atom PDF