Skip to content

Commit

Permalink
Updated field_dropdown to properly infer its Field type with TS 5.3.3
Browse files Browse the repository at this point in the history
  • Loading branch information
btw17 committed Mar 15, 2024
1 parent 0ecbcde commit 5d8fe68
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
4 changes: 4 additions & 0 deletions core/field_dropdown.ts
Original file line number Diff line number Diff line change
Expand Up @@ -408,6 +408,10 @@ export class FieldDropdown extends Field<string> {
* @param newValue The input value.
* @returns A valid language-neutral option, or null if invalid.
*/
protected override doClassValidation_(
newValue: string,
): string | null | undefined;
protected override doClassValidation_(newValue?: string): string | null;
protected override doClassValidation_(newValue?: string): string | null {
const options = this.getOptions(true);
const isValueValid = options.some((option) => option[1] === newValue);
Expand Down
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
},
Expand Down

0 comments on commit 5d8fe68

Please sign in to comment.