Skip to content

Commit

Permalink
better type docs for validation message (#150923)
Browse files Browse the repository at this point in the history
  • Loading branch information
TylerLeonhardt committed Jun 1, 2022
1 parent 4589815 commit d724243
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/vscode-dts/vscode.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2050,8 +2050,8 @@ declare module 'vscode' {
* to the user.
*
* @param value The current value of the input box.
* @return A human-readable string which is presented as diagnostic message.
* Return `undefined`, `null`, or the empty string when 'value' is valid.
* @return Either a human-readable string which is presented as an error message or an {@link InputBoxValidationMessage}
* which can provide a specific message severity. Return `undefined`, `null`, or the empty string when 'value' is valid.
*/
validateInput?(value: string): string | InputBoxValidationMessage | undefined | null |
Thenable<string | InputBoxValidationMessage | undefined | null>;
Expand Down Expand Up @@ -11125,6 +11125,8 @@ declare module 'vscode' {

/**
* An optional validation message indicating a problem with the current input value.
* By returning a string, the InputBox will use a default {@link InputBoxValidationSeverity} of Error.
* Returning undefined clears the validation message.
*/
validationMessage: string | InputBoxValidationMessage | undefined;
}
Expand Down

0 comments on commit d724243

Please sign in to comment.