@theia/plugin 1.25.0-next.1 → 1.25.0-next.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +2 -2
- package/src/theia.d.ts +40 -27
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@theia/plugin",
|
|
3
|
-
"version": "1.25.0-next.
|
|
3
|
+
"version": "1.25.0-next.4+1c7bdf70025",
|
|
4
4
|
"description": "Theia - Plugin API",
|
|
5
5
|
"types": "./src/theia.d.ts",
|
|
6
6
|
"publishConfig": {
|
|
@@ -32,5 +32,5 @@
|
|
|
32
32
|
"nyc": {
|
|
33
33
|
"extends": "../../configs/nyc.json"
|
|
34
34
|
},
|
|
35
|
-
"gitHead": "
|
|
35
|
+
"gitHead": "1c7bdf70025c684e7ca22c482e206cceb405ddbd"
|
|
36
36
|
}
|
package/src/theia.d.ts
CHANGED
|
@@ -496,6 +496,17 @@ export module '@theia/plugin' {
|
|
|
496
496
|
*/
|
|
497
497
|
appendPlaceholder(value: string | ((snippet: SnippetString) => any), number?: number): SnippetString;
|
|
498
498
|
|
|
499
|
+
/**
|
|
500
|
+
* Builder-function that appends a choice (`${1|a,b,c|}`) to
|
|
501
|
+
* the {@linkcode SnippetString.value value} of this snippet string.
|
|
502
|
+
*
|
|
503
|
+
* @param values The values for choices - the array of strings
|
|
504
|
+
* @param number The number of this tabstop, defaults to an auto-increment
|
|
505
|
+
* value starting at 1.
|
|
506
|
+
* @return This snippet string.
|
|
507
|
+
*/
|
|
508
|
+
appendChoice(values: string[], number?: number): SnippetString;
|
|
509
|
+
|
|
499
510
|
/**
|
|
500
511
|
* Builder-function that appends a variable (`${VAR}`) to
|
|
501
512
|
* the [`value`](#SnippetString.value) of this snippet string.
|
|
@@ -4211,36 +4222,43 @@ export module '@theia/plugin' {
|
|
|
4211
4222
|
|
|
4212
4223
|
/**
|
|
4213
4224
|
* Shows a selection list.
|
|
4214
|
-
*
|
|
4215
|
-
* @param
|
|
4216
|
-
* @param
|
|
4225
|
+
*
|
|
4226
|
+
* @param items An array of strings, or a promise that resolves to an array of strings.
|
|
4227
|
+
* @param options Configures the behavior of the selection list.
|
|
4228
|
+
* @param token A token that can be used to signal cancellation.
|
|
4229
|
+
* @return A promise that resolves to the selection or `undefined`.
|
|
4217
4230
|
*/
|
|
4218
|
-
export function showQuickPick(items: string[] | PromiseLike<string[]>, options: QuickPickOptions, token?: CancellationToken): PromiseLike<string | undefined>;
|
|
4231
|
+
export function showQuickPick(readonly items: string[] | PromiseLike<readonly string[]>, options: QuickPickOptions, token?: CancellationToken): PromiseLike<string | undefined>;
|
|
4219
4232
|
|
|
4220
4233
|
/**
|
|
4221
|
-
* Shows a selection list
|
|
4234
|
+
* Shows a selection list allowing multiple selections.
|
|
4235
|
+
*
|
|
4236
|
+
* @param items An array of strings, or a promise that resolves to an array of strings.
|
|
4237
|
+
* @param options Configures the behavior of the selection list.
|
|
4238
|
+
* @param token A token that can be used to signal cancellation.
|
|
4239
|
+
* @return A promise that resolves to the selected items or `undefined`.
|
|
4222
4240
|
*/
|
|
4223
|
-
export function showQuickPick(
|
|
4224
|
-
items: string[] | PromiseLike<string[]>,
|
|
4225
|
-
options: QuickPickOptions & { canPickMany: true },
|
|
4226
|
-
token?: CancellationToken
|
|
4227
|
-
): PromiseLike<string[] | undefined>;
|
|
4241
|
+
export function showQuickPick(readonly items: string[] | PromiseLike<readonly string[]>, options: QuickPickOptions & { canPickMany: true }, token?: CancellationToken): PromiseLike<string[] | undefined>;
|
|
4228
4242
|
|
|
4229
4243
|
/**
|
|
4230
4244
|
* Shows a selection list.
|
|
4231
|
-
*
|
|
4232
|
-
* @param
|
|
4233
|
-
* @param
|
|
4245
|
+
*
|
|
4246
|
+
* @param items An array of items, or a promise that resolves to an array of items.
|
|
4247
|
+
* @param options Configures the behavior of the selection list.
|
|
4248
|
+
* @param token A token that can be used to signal cancellation.
|
|
4249
|
+
* @return A promise that resolves to the selected item or `undefined`.
|
|
4234
4250
|
*/
|
|
4235
|
-
export function showQuickPick<T extends QuickPickItem>(items: T[] | PromiseLike<T[]>, options: QuickPickOptions, token?: CancellationToken): PromiseLike<T | undefined>;
|
|
4251
|
+
export function showQuickPick<T extends QuickPickItem>(items: readonly T[] | PromiseLike<readonly T[]>, options: QuickPickOptions, token?: CancellationToken): PromiseLike<T | undefined>;
|
|
4236
4252
|
|
|
4237
4253
|
/**
|
|
4238
|
-
* Shows a selection list
|
|
4254
|
+
* Shows a selection list allowing multiple selections.
|
|
4255
|
+
*
|
|
4256
|
+
* @param items An array of items, or a promise that resolves to an array of items.
|
|
4257
|
+
* @param options Configures the behavior of the selection list.
|
|
4258
|
+
* @param token A token that can be used to signal cancellation.
|
|
4259
|
+
* @return A promise that resolves to the selected items or `undefined`.
|
|
4239
4260
|
*/
|
|
4240
|
-
export function showQuickPick<T extends QuickPickItem>(items: T[] | PromiseLike<T[]>,
|
|
4241
|
-
options: QuickPickOptions & { canPickMany: true },
|
|
4242
|
-
token?: CancellationToken
|
|
4243
|
-
): PromiseLike<T[] | undefined>;
|
|
4261
|
+
export function showQuickPick<T extends QuickPickItem>(items: readonly T[] | PromiseLike<readonly T[]>, options: QuickPickOptions & { canPickMany: true }, token?: CancellationToken): PromiseLike<T[] | undefined>;
|
|
4244
4262
|
|
|
4245
4263
|
/**
|
|
4246
4264
|
* Creates a [QuickPick](#QuickPick) to let the user pick an item from a list
|
|
@@ -7902,7 +7920,7 @@ export module '@theia/plugin' {
|
|
|
7902
7920
|
*
|
|
7903
7921
|
* A code action can be any command that is [known](#commands.getCommands) to the system.
|
|
7904
7922
|
*/
|
|
7905
|
-
export interface CodeActionProvider {
|
|
7923
|
+
export interface CodeActionProvider<T extends CodeAction = CodeAction> {
|
|
7906
7924
|
/**
|
|
7907
7925
|
* Provide commands for the given document and range.
|
|
7908
7926
|
*
|
|
@@ -7914,12 +7932,7 @@ export module '@theia/plugin' {
|
|
|
7914
7932
|
* @return An array of commands, quick fixes, or refactorings or a thenable of such. The lack of a result can be
|
|
7915
7933
|
* signaled by returning `undefined`, `null`, or an empty array.
|
|
7916
7934
|
*/
|
|
7917
|
-
provideCodeActions(
|
|
7918
|
-
document: TextDocument,
|
|
7919
|
-
range: Range | Selection,
|
|
7920
|
-
context: CodeActionContext,
|
|
7921
|
-
token: CancellationToken | undefined
|
|
7922
|
-
): ProviderResult<(Command | CodeAction)[]>;
|
|
7935
|
+
provideCodeActions(document: TextDocument, range: Range | Selection, context: CodeActionContext, token: CancellationToken | undefined): ProviderResult<(Command | T)[]>;
|
|
7923
7936
|
|
|
7924
7937
|
/**
|
|
7925
7938
|
* Given a code action fill in its `edit`-property. Changes to
|
|
@@ -7935,7 +7948,7 @@ export module '@theia/plugin' {
|
|
|
7935
7948
|
* @return The resolved code action or a thenable that resolves to such. It is OK to return the given
|
|
7936
7949
|
* `item`. When no result is returned, the given `item` will be used.
|
|
7937
7950
|
*/
|
|
7938
|
-
resolveCodeAction?(codeAction:
|
|
7951
|
+
resolveCodeAction?(codeAction: T, token: CancellationToken | undefined): ProviderResult<T>;
|
|
7939
7952
|
}
|
|
7940
7953
|
|
|
7941
7954
|
/**
|