diff --git a/core/field_dropdown.ts b/core/field_dropdown.ts index ad728f2267a..6fb779c4f4c 100644 --- a/core/field_dropdown.ts +++ b/core/field_dropdown.ts @@ -408,7 +408,13 @@ export class FieldDropdown extends Field { * @param newValue The input value. * @returns A valid language-neutral option, or null if invalid. */ - protected override doClassValidation_(newValue?: string): string | null { + protected override doClassValidation_( + newValue: string, + ): string | null | undefined; + protected override doClassValidation_(newValue?: string): string | null; + protected override doClassValidation_( + newValue?: string, + ): string | null | undefined { const options = this.getOptions(true); const isValueValid = options.some((option) => option[1] === newValue); @@ -426,7 +432,7 @@ export class FieldDropdown extends Field { } return null; } - return newValue as string; + return newValue; } /** diff --git a/package-lock.json b/package-lock.json index 20e03a0976f..f0ec9fc4e30 100644 --- a/package-lock.json +++ b/package-lock.json @@ -48,7 +48,7 @@ "prettier": "3.2.5", "readline-sync": "^1.4.10", "rimraf": "^5.0.0", - "typescript": "^5.0.2", + "typescript": "^5.3.3", "webdriverio": "^8.32.2", "yargs": "^17.2.1" } @@ -10885,9 +10885,9 @@ "dev": true }, "node_modules/typescript": { - "version": "5.2.2", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.2.2.tgz", - "integrity": "sha512-mI4WrpHsbCIcwT9cF4FZvr80QUeKvsUsUvKDoR+X/7XHQH98xYD8YHZg7ANtz2GtZt/CBq2QJ0thkGJMHfqc1w==", + "version": "5.4.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.4.2.tgz", + "integrity": "sha512-+2/g0Fds1ERlP6JsakQQDXjZdZMM+rqpamFZJEKh4kwTIn3iDkgKtby0CeNd5ATNZ4Ry1ax15TMx0W2V+miizQ==", "dev": true, "bin": { "tsc": "bin/tsc", diff --git a/package.json b/package.json index a7ac581f02d..ecfe593ce0a 100644 --- a/package.json +++ b/package.json @@ -100,7 +100,7 @@ "prettier": "3.2.5", "readline-sync": "^1.4.10", "rimraf": "^5.0.0", - "typescript": "^5.0.2", + "typescript": "^5.3.3", "webdriverio": "^8.32.2", "yargs": "^17.2.1" },