mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-22 01:29:04 +01:00
fix tree layout, add proposed API
This commit is contained in:
43
src/vscode-dts/vscode.proposed.notebookVariableProvider.d.ts
vendored
Normal file
43
src/vscode-dts/vscode.proposed.notebookVariableProvider.d.ts
vendored
Normal file
@@ -0,0 +1,43 @@
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* 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' {
|
||||
|
||||
export interface NotebookController {
|
||||
/** Set this to attach a variable provider to this controller. */
|
||||
variableProvider?: NotebookVariableProvider;
|
||||
}
|
||||
|
||||
export enum VariablesRequestKind {
|
||||
Named,
|
||||
Indexed
|
||||
}
|
||||
|
||||
interface VariablesResult {
|
||||
variable: Variable;
|
||||
namedVariableCount: number;
|
||||
indexedVariableCount: number;
|
||||
}
|
||||
|
||||
interface NotebookVariableProvider {
|
||||
onDidChangeVariables: Event<void>;
|
||||
|
||||
/** When variablesReference is undefined, this is requesting global Variables. When a variable is passed, it's requesting child props of that Variable. */
|
||||
provideChildren(notebook: NotebookDocument, variable: Variable | undefined, kind: VariablesRequestKind, start: number, token: CancellationToken): AsyncIterable<VariablesResult>;
|
||||
}
|
||||
|
||||
interface Variable {
|
||||
/** The variable's name. */
|
||||
name: string;
|
||||
|
||||
/** The variable's value.
|
||||
This can be a multi-line text, e.g. for a function the body of a function.
|
||||
For structured variables (which do not have a simple value), it is recommended to provide a one-line representation of the structured object.
|
||||
This helps to identify the structured object in the collapsed state when its children are not yet visible.
|
||||
An empty string can be used if no value should be shown in the UI.
|
||||
*/
|
||||
value: string;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user