blob: 66b2da1b68b8ef5a40ebc4a132d82793b16c1eae (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
|
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
declare module 'vscode' {
// https://github.com/microsoft/vscode/issues/144944
/**
* Impacts the behavior and appearance of the validation message.
*/
export enum InputBoxValidationSeverity {
Info = 1,
Warning = 2,
Error = 3
}
/**
* Object to configure the behavior of the validation message.
*/
export interface InputBoxValidationMessage {
/**
* The validation message to display.
*/
readonly message: string;
/**
* The severity of the validation message.
* NOTE: When using `InputBoxValidationSeverity.Error`, the user will not be allowed to accept (hit ENTER) the input.
* `Info` and `Warning` will still allow the InputBox to accept the input.
*/
readonly severity: InputBoxValidationSeverity;
}
export interface InputBoxOptions {
/**
* The validation message to display. This will become the new {@link InputBoxOptions#validateInput} upon finalization.
*/
validateInput2?(value: string): string | InputBoxValidationMessage | undefined | null |
Thenable<string | InputBoxValidationMessage | undefined | null>;
}
export interface InputBox {
/**
* The validation message to display. This will become the new {@link InputBox#validationMessage} upon finalization.
*/
validationMessage2: string | InputBoxValidationMessage | undefined;
}
}
|