|
@@ -1,6 +1,6 @@
|
|
/*!-----------------------------------------------------------
|
|
/*!-----------------------------------------------------------
|
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
- * Type definitions for monaco-editor v0.15.6
|
|
|
|
|
|
+ * Type definitions for monaco-editor v0.16.0
|
|
* Released under the MIT license
|
|
* Released under the MIT license
|
|
*-----------------------------------------------------------*/
|
|
*-----------------------------------------------------------*/
|
|
/*---------------------------------------------------------------------------------------------
|
|
/*---------------------------------------------------------------------------------------------
|
|
@@ -26,7 +26,7 @@ declare namespace monaco {
|
|
export class Emitter<T> {
|
|
export class Emitter<T> {
|
|
constructor();
|
|
constructor();
|
|
readonly event: IEvent<T>;
|
|
readonly event: IEvent<T>;
|
|
- fire(event?: T): void;
|
|
|
|
|
|
+ fire(event: T): void;
|
|
dispose(): void;
|
|
dispose(): void;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -42,29 +42,6 @@ declare namespace monaco {
|
|
Error = 8
|
|
Error = 8
|
|
}
|
|
}
|
|
|
|
|
|
-
|
|
|
|
- export class Promise<T = any> {
|
|
|
|
- constructor(executor: (resolve: (value: T | PromiseLike<T>) => void, reject: (reason: any) => void) => void);
|
|
|
|
-
|
|
|
|
- public then<TResult1 = T, TResult2 = never>(
|
|
|
|
- onfulfilled?: ((value: T) => TResult1 | PromiseLike<TResult1>) | null,
|
|
|
|
- onrejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | null): Promise<TResult1 | TResult2>;
|
|
|
|
-
|
|
|
|
-
|
|
|
|
- public static as(value: null): Promise<null>;
|
|
|
|
- public static as(value: undefined): Promise<undefined>;
|
|
|
|
- public static as<T>(value: PromiseLike<T>): PromiseLike<T>;
|
|
|
|
- public static as<T, SomePromise extends PromiseLike<T>>(value: SomePromise): SomePromise;
|
|
|
|
- public static as<T>(value: T): Promise<T>;
|
|
|
|
-
|
|
|
|
- public static join<T1, T2>(promises: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>]): Promise<[T1, T2]>;
|
|
|
|
- public static join<T>(promises: (T | PromiseLike<T>)[]): Promise<T[]>;
|
|
|
|
-
|
|
|
|
- public static wrap<T>(value: T | PromiseLike<T>): Promise<T>;
|
|
|
|
-
|
|
|
|
- public static wrapError<T = never>(error: Error): Promise<T>;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
export class CancellationTokenSource {
|
|
export class CancellationTokenSource {
|
|
readonly token: CancellationToken;
|
|
readonly token: CancellationToken;
|
|
cancel(): void;
|
|
cancel(): void;
|
|
@@ -156,7 +133,7 @@ declare namespace monaco {
|
|
*
|
|
*
|
|
* @param value A string which represents an Uri (see `Uri#toString`).
|
|
* @param value A string which represents an Uri (see `Uri#toString`).
|
|
*/
|
|
*/
|
|
- static parse(value: string): Uri;
|
|
|
|
|
|
+ static parse(value: string, _strict?: boolean): Uri;
|
|
/**
|
|
/**
|
|
* Creates a new Uri from a file system path, e.g. `c:\my\files`,
|
|
* Creates a new Uri from a file system path, e.g. `c:\my\files`,
|
|
* `/usr/home`, or `\\server\share\some\path`.
|
|
* `/usr/home`, or `\\server\share\some\path`.
|
|
@@ -187,7 +164,7 @@ declare namespace monaco {
|
|
fragment?: string;
|
|
fragment?: string;
|
|
}): Uri;
|
|
}): Uri;
|
|
/**
|
|
/**
|
|
- * Creates a string presentation for this Uri. It's guaranteed that calling
|
|
|
|
|
|
+ * Creates a string representation for this Uri. It's guaranteed that calling
|
|
* `Uri.parse` with the result of this function creates an Uri which is equal
|
|
* `Uri.parse` with the result of this function creates an Uri which is equal
|
|
* to this Uri.
|
|
* to this Uri.
|
|
*
|
|
*
|
|
@@ -390,6 +367,7 @@ declare namespace monaco {
|
|
*/
|
|
*/
|
|
MAX_VALUE = 112
|
|
MAX_VALUE = 112
|
|
}
|
|
}
|
|
|
|
+
|
|
export class KeyMod {
|
|
export class KeyMod {
|
|
static readonly CtrlCmd: number;
|
|
static readonly CtrlCmd: number;
|
|
static readonly Shift: number;
|
|
static readonly Shift: number;
|
|
@@ -397,12 +375,17 @@ declare namespace monaco {
|
|
static readonly WinCtrl: number;
|
|
static readonly WinCtrl: number;
|
|
static chord(firstPart: number, secondPart: number): number;
|
|
static chord(firstPart: number, secondPart: number): number;
|
|
}
|
|
}
|
|
|
|
+
|
|
export interface IMarkdownString {
|
|
export interface IMarkdownString {
|
|
value: string;
|
|
value: string;
|
|
isTrusted?: boolean;
|
|
isTrusted?: boolean;
|
|
|
|
+ uris?: {
|
|
|
|
+ [href: string]: UriComponents;
|
|
|
|
+ };
|
|
}
|
|
}
|
|
|
|
|
|
export interface IKeyboardEvent {
|
|
export interface IKeyboardEvent {
|
|
|
|
+ readonly _standardKeyboardEventBrand: true;
|
|
readonly browserEvent: KeyboardEvent;
|
|
readonly browserEvent: KeyboardEvent;
|
|
readonly target: HTMLElement;
|
|
readonly target: HTMLElement;
|
|
readonly ctrlKey: boolean;
|
|
readonly ctrlKey: boolean;
|
|
@@ -491,7 +474,7 @@ declare namespace monaco {
|
|
/**
|
|
/**
|
|
* Test if position `a` equals position `b`
|
|
* Test if position `a` equals position `b`
|
|
*/
|
|
*/
|
|
- static equals(a: IPosition, b: IPosition): boolean;
|
|
|
|
|
|
+ static equals(a: IPosition | null, b: IPosition | null): boolean;
|
|
/**
|
|
/**
|
|
* Test if this position is before other position.
|
|
* Test if this position is before other position.
|
|
* If the two positions are equal, the result will be false.
|
|
* If the two positions are equal, the result will be false.
|
|
@@ -869,8 +852,8 @@ declare namespace monaco.editor {
|
|
|
|
|
|
/**
|
|
/**
|
|
* Get markers for owner and/or resource
|
|
* Get markers for owner and/or resource
|
|
- * @returns {IMarker[]} list of markers
|
|
|
|
- * @param filter
|
|
|
|
|
|
+ *
|
|
|
|
+ * @returns list of markers
|
|
*/
|
|
*/
|
|
export function getModelMarkers(filter: {
|
|
export function getModelMarkers(filter: {
|
|
owner?: string;
|
|
owner?: string;
|
|
@@ -945,6 +928,11 @@ declare namespace monaco.editor {
|
|
*/
|
|
*/
|
|
export function setTheme(themeName: string): void;
|
|
export function setTheme(themeName: string): void;
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
+ * Clears all cached font measurements and triggers re-measurement.
|
|
|
|
+ */
|
|
|
|
+ export function remeasureFonts(): void;
|
|
|
|
+
|
|
export type BuiltinTheme = 'vs' | 'vs-dark' | 'hc-black';
|
|
export type BuiltinTheme = 'vs' | 'vs-dark' | 'hc-black';
|
|
|
|
|
|
export interface IStandaloneThemeData {
|
|
export interface IStandaloneThemeData {
|
|
@@ -1094,13 +1082,13 @@ declare namespace monaco.editor {
|
|
}
|
|
}
|
|
|
|
|
|
export interface IStandaloneCodeEditor extends ICodeEditor {
|
|
export interface IStandaloneCodeEditor extends ICodeEditor {
|
|
- addCommand(keybinding: number, handler: ICommandHandler, context: string): string | null;
|
|
|
|
|
|
+ addCommand(keybinding: number, handler: ICommandHandler, context?: string): string | null;
|
|
createContextKey<T>(key: string, defaultValue: T): IContextKey<T>;
|
|
createContextKey<T>(key: string, defaultValue: T): IContextKey<T>;
|
|
addAction(descriptor: IActionDescriptor): IDisposable;
|
|
addAction(descriptor: IActionDescriptor): IDisposable;
|
|
}
|
|
}
|
|
|
|
|
|
export interface IStandaloneDiffEditor extends IDiffEditor {
|
|
export interface IStandaloneDiffEditor extends IDiffEditor {
|
|
- addCommand(keybinding: number, handler: ICommandHandler, context: string): string | null;
|
|
|
|
|
|
+ addCommand(keybinding: number, handler: ICommandHandler, context?: string): string | null;
|
|
createContextKey<T>(key: string, defaultValue: T): IContextKey<T>;
|
|
createContextKey<T>(key: string, defaultValue: T): IContextKey<T>;
|
|
addAction(descriptor: IActionDescriptor): IDisposable;
|
|
addAction(descriptor: IActionDescriptor): IDisposable;
|
|
getOriginalEditor(): IStandaloneCodeEditor;
|
|
getOriginalEditor(): IStandaloneCodeEditor;
|
|
@@ -1444,6 +1432,7 @@ declare namespace monaco.editor {
|
|
export class TextModelResolvedOptions {
|
|
export class TextModelResolvedOptions {
|
|
_textModelResolvedOptionsBrand: void;
|
|
_textModelResolvedOptionsBrand: void;
|
|
readonly tabSize: number;
|
|
readonly tabSize: number;
|
|
|
|
+ readonly indentSize: number;
|
|
readonly insertSpaces: boolean;
|
|
readonly insertSpaces: boolean;
|
|
readonly defaultEOL: DefaultEndOfLine;
|
|
readonly defaultEOL: DefaultEndOfLine;
|
|
readonly trimAutoWhitespace: boolean;
|
|
readonly trimAutoWhitespace: boolean;
|
|
@@ -1451,6 +1440,7 @@ declare namespace monaco.editor {
|
|
|
|
|
|
export interface ITextModelUpdateOptions {
|
|
export interface ITextModelUpdateOptions {
|
|
tabSize?: number;
|
|
tabSize?: number;
|
|
|
|
+ indentSize?: number;
|
|
insertSpaces?: boolean;
|
|
insertSpaces?: boolean;
|
|
trimAutoWhitespace?: boolean;
|
|
trimAutoWhitespace?: boolean;
|
|
}
|
|
}
|
|
@@ -1737,10 +1727,6 @@ declare namespace monaco.editor {
|
|
* Normalize a string containing whitespace according to indentation rules (converts to spaces or to tabs).
|
|
* Normalize a string containing whitespace according to indentation rules (converts to spaces or to tabs).
|
|
*/
|
|
*/
|
|
normalizeIndentation(str: string): string;
|
|
normalizeIndentation(str: string): string;
|
|
- /**
|
|
|
|
- * Get what is considered to be one indent (e.g. a tab character or 4 spaces, etc.).
|
|
|
|
- */
|
|
|
|
- getOneIndent(): string;
|
|
|
|
/**
|
|
/**
|
|
* Change the options of this model.
|
|
* Change the options of this model.
|
|
*/
|
|
*/
|
|
@@ -1994,8 +1980,8 @@ declare namespace monaco.editor {
|
|
* (Serializable) View state for the diff editor.
|
|
* (Serializable) View state for the diff editor.
|
|
*/
|
|
*/
|
|
export interface IDiffEditorViewState {
|
|
export interface IDiffEditorViewState {
|
|
- original: ICodeEditorViewState;
|
|
|
|
- modified: ICodeEditorViewState;
|
|
|
|
|
|
+ original: ICodeEditorViewState | null;
|
|
|
|
+ modified: ICodeEditorViewState | null;
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -2286,6 +2272,7 @@ declare namespace monaco.editor {
|
|
* An event describing that some ranges of lines have been tokenized (their tokens have changed).
|
|
* An event describing that some ranges of lines have been tokenized (their tokens have changed).
|
|
*/
|
|
*/
|
|
export interface IModelTokensChangedEvent {
|
|
export interface IModelTokensChangedEvent {
|
|
|
|
+ readonly tokenizationSupportChanged: boolean;
|
|
readonly ranges: {
|
|
readonly ranges: {
|
|
/**
|
|
/**
|
|
* The start of the range (inclusive)
|
|
* The start of the range (inclusive)
|
|
@@ -2300,6 +2287,7 @@ declare namespace monaco.editor {
|
|
|
|
|
|
export interface IModelOptionsChangedEvent {
|
|
export interface IModelOptionsChangedEvent {
|
|
readonly tabSize: boolean;
|
|
readonly tabSize: boolean;
|
|
|
|
+ readonly indentSize: boolean;
|
|
readonly insertSpaces: boolean;
|
|
readonly insertSpaces: boolean;
|
|
readonly trimAutoWhitespace: boolean;
|
|
readonly trimAutoWhitespace: boolean;
|
|
}
|
|
}
|
|
@@ -2455,6 +2443,7 @@ declare namespace monaco.editor {
|
|
* Controls if Find in Selection flag is turned on when multiple lines of text are selected in the editor.
|
|
* Controls if Find in Selection flag is turned on when multiple lines of text are selected in the editor.
|
|
*/
|
|
*/
|
|
autoFindInSelection: boolean;
|
|
autoFindInSelection: boolean;
|
|
|
|
+ addExtraSpaceOnTop?: boolean;
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -2559,6 +2548,10 @@ declare namespace monaco.editor {
|
|
* Favours words that appear close to the cursor.
|
|
* Favours words that appear close to the cursor.
|
|
*/
|
|
*/
|
|
localityBonus?: boolean;
|
|
localityBonus?: boolean;
|
|
|
|
+ /**
|
|
|
|
+ * Enable using global storage for remembering suggestions.
|
|
|
|
+ */
|
|
|
|
+ shareSuggestSelections?: boolean;
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -2599,6 +2592,11 @@ declare namespace monaco.editor {
|
|
* Defaults to true.
|
|
* Defaults to true.
|
|
*/
|
|
*/
|
|
lineNumbers?: 'on' | 'off' | 'relative' | 'interval' | ((lineNumber: number) => string);
|
|
lineNumbers?: 'on' | 'off' | 'relative' | 'interval' | ((lineNumber: number) => string);
|
|
|
|
+ /**
|
|
|
|
+ * Render last line number when the file ends with a newline.
|
|
|
|
+ * Defaults to true on Windows/Mac and to false on Linux.
|
|
|
|
+ */
|
|
|
|
+ renderFinalNewline?: boolean;
|
|
/**
|
|
/**
|
|
* Should the corresponding line be selected when clicking on the line number?
|
|
* Should the corresponding line be selected when clicking on the line number?
|
|
* Defaults to true.
|
|
* Defaults to true.
|
|
@@ -2678,6 +2676,11 @@ declare namespace monaco.editor {
|
|
* Defaults to false.
|
|
* Defaults to false.
|
|
*/
|
|
*/
|
|
mouseWheelZoom?: boolean;
|
|
mouseWheelZoom?: boolean;
|
|
|
|
+ /**
|
|
|
|
+ * Enable smooth caret animation.
|
|
|
|
+ * Defaults to false.
|
|
|
|
+ */
|
|
|
|
+ cursorSmoothCaretAnimation?: boolean;
|
|
/**
|
|
/**
|
|
* Control the cursor style, either 'block' or 'line'.
|
|
* Control the cursor style, either 'block' or 'line'.
|
|
* Defaults to 'line'.
|
|
* Defaults to 'line'.
|
|
@@ -2801,6 +2804,11 @@ declare namespace monaco.editor {
|
|
* Defaults to 1.
|
|
* Defaults to 1.
|
|
*/
|
|
*/
|
|
mouseWheelScrollSensitivity?: number;
|
|
mouseWheelScrollSensitivity?: number;
|
|
|
|
+ /**
|
|
|
|
+ * FastScrolling mulitplier speed when pressing `Alt`
|
|
|
|
+ * Defaults to 5.
|
|
|
|
+ */
|
|
|
|
+ fastScrollSensitivity?: number;
|
|
/**
|
|
/**
|
|
* The modifier to be used to add multiple cursors with the mouse.
|
|
* The modifier to be used to add multiple cursors with the mouse.
|
|
* Defaults to 'alt'
|
|
* Defaults to 'alt'
|
|
@@ -3163,6 +3171,7 @@ declare namespace monaco.editor {
|
|
readonly verticalScrollbarSize: number;
|
|
readonly verticalScrollbarSize: number;
|
|
readonly verticalSliderSize: number;
|
|
readonly verticalSliderSize: number;
|
|
readonly mouseWheelScrollSensitivity: number;
|
|
readonly mouseWheelScrollSensitivity: number;
|
|
|
|
+ readonly fastScrollSensitivity: number;
|
|
}
|
|
}
|
|
|
|
|
|
export interface InternalEditorMinimapOptions {
|
|
export interface InternalEditorMinimapOptions {
|
|
@@ -3176,6 +3185,7 @@ declare namespace monaco.editor {
|
|
export interface InternalEditorFindOptions {
|
|
export interface InternalEditorFindOptions {
|
|
readonly seedSearchStringFromSelection: boolean;
|
|
readonly seedSearchStringFromSelection: boolean;
|
|
readonly autoFindInSelection: boolean;
|
|
readonly autoFindInSelection: boolean;
|
|
|
|
+ readonly addExtraSpaceOnTop: boolean;
|
|
}
|
|
}
|
|
|
|
|
|
export interface InternalEditorHoverOptions {
|
|
export interface InternalEditorHoverOptions {
|
|
@@ -3189,6 +3199,7 @@ declare namespace monaco.editor {
|
|
readonly snippets: 'top' | 'bottom' | 'inline' | 'none';
|
|
readonly snippets: 'top' | 'bottom' | 'inline' | 'none';
|
|
readonly snippetsPreventQuickSuggestions: boolean;
|
|
readonly snippetsPreventQuickSuggestions: boolean;
|
|
readonly localityBonus: boolean;
|
|
readonly localityBonus: boolean;
|
|
|
|
+ readonly shareSuggestSelections: boolean;
|
|
}
|
|
}
|
|
|
|
|
|
export interface InternalParameterHintOptions {
|
|
export interface InternalParameterHintOptions {
|
|
@@ -3223,6 +3234,7 @@ declare namespace monaco.editor {
|
|
readonly ariaLabel: string;
|
|
readonly ariaLabel: string;
|
|
readonly renderLineNumbers: RenderLineNumbersType;
|
|
readonly renderLineNumbers: RenderLineNumbersType;
|
|
readonly renderCustomLineNumbers: ((lineNumber: number) => string) | null;
|
|
readonly renderCustomLineNumbers: ((lineNumber: number) => string) | null;
|
|
|
|
+ readonly renderFinalNewline: boolean;
|
|
readonly selectOnLineNumbers: boolean;
|
|
readonly selectOnLineNumbers: boolean;
|
|
readonly glyphMargin: boolean;
|
|
readonly glyphMargin: boolean;
|
|
readonly revealHorizontalRightPadding: number;
|
|
readonly revealHorizontalRightPadding: number;
|
|
@@ -3231,6 +3243,7 @@ declare namespace monaco.editor {
|
|
readonly overviewRulerBorder: boolean;
|
|
readonly overviewRulerBorder: boolean;
|
|
readonly cursorBlinking: TextEditorCursorBlinkingStyle;
|
|
readonly cursorBlinking: TextEditorCursorBlinkingStyle;
|
|
readonly mouseWheelZoom: boolean;
|
|
readonly mouseWheelZoom: boolean;
|
|
|
|
+ readonly cursorSmoothCaretAnimation: boolean;
|
|
readonly cursorStyle: TextEditorCursorStyle;
|
|
readonly cursorStyle: TextEditorCursorStyle;
|
|
readonly cursorWidth: number;
|
|
readonly cursorWidth: number;
|
|
readonly hideCursorInOverviewRuler: boolean;
|
|
readonly hideCursorInOverviewRuler: boolean;
|
|
@@ -4048,7 +4061,7 @@ declare namespace monaco.editor {
|
|
/**
|
|
/**
|
|
* Force an editor render now.
|
|
* Force an editor render now.
|
|
*/
|
|
*/
|
|
- render(): void;
|
|
|
|
|
|
+ render(forceRedraw?: boolean): void;
|
|
/**
|
|
/**
|
|
* Get the hit test target at coordinates `clientX` and `clientY`.
|
|
* Get the hit test target at coordinates `clientX` and `clientY`.
|
|
* The coordinates are relative to the top-left of the viewport.
|
|
* The coordinates are relative to the top-left of the viewport.
|
|
@@ -4276,12 +4289,12 @@ declare namespace monaco.languages {
|
|
/**
|
|
/**
|
|
* Set the tokens provider for a language (manual implementation).
|
|
* Set the tokens provider for a language (manual implementation).
|
|
*/
|
|
*/
|
|
- export function setTokensProvider(languageId: string, provider: TokensProvider | EncodedTokensProvider): IDisposable;
|
|
|
|
|
|
+ export function setTokensProvider(languageId: string, provider: TokensProvider | EncodedTokensProvider | Thenable<TokensProvider | EncodedTokensProvider>): IDisposable;
|
|
|
|
|
|
/**
|
|
/**
|
|
* Set the tokens provider for a language (monarch implementation).
|
|
* Set the tokens provider for a language (monarch implementation).
|
|
*/
|
|
*/
|
|
- export function setMonarchTokensProvider(languageId: string, languageDef: IMonarchLanguage): IDisposable;
|
|
|
|
|
|
+ export function setMonarchTokensProvider(languageId: string, languageDef: IMonarchLanguage | Thenable<IMonarchLanguage>): IDisposable;
|
|
|
|
|
|
/**
|
|
/**
|
|
* Register a reference provider (used by e.g. reference search).
|
|
* Register a reference provider (used by e.g. reference search).
|
|
@@ -4380,8 +4393,6 @@ declare namespace monaco.languages {
|
|
export interface CodeActionContext {
|
|
export interface CodeActionContext {
|
|
/**
|
|
/**
|
|
* An array of diagnostics.
|
|
* An array of diagnostics.
|
|
- *
|
|
|
|
- * @readonly
|
|
|
|
*/
|
|
*/
|
|
readonly markers: editor.IMarkerData[];
|
|
readonly markers: editor.IMarkerData[];
|
|
/**
|
|
/**
|
|
@@ -4398,7 +4409,7 @@ declare namespace monaco.languages {
|
|
/**
|
|
/**
|
|
* Provide commands for the given document and range.
|
|
* Provide commands for the given document and range.
|
|
*/
|
|
*/
|
|
- provideCodeActions(model: editor.ITextModel, range: Range, context: CodeActionContext, token: CancellationToken): (Command | CodeAction)[] | Thenable<(Command | CodeAction)[]>;
|
|
|
|
|
|
+ provideCodeActions(model: editor.ITextModel, range: Range, context: CodeActionContext, token: CancellationToken): (Command | CodeAction)[] | Promise<(Command | CodeAction)[]>;
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -4489,11 +4500,11 @@ declare namespace monaco.languages {
|
|
/**
|
|
/**
|
|
* If a line matches this pattern, then **only the next line** after it should be indented once.
|
|
* If a line matches this pattern, then **only the next line** after it should be indented once.
|
|
*/
|
|
*/
|
|
- indentNextLinePattern?: RegExp;
|
|
|
|
|
|
+ indentNextLinePattern?: RegExp | null;
|
|
/**
|
|
/**
|
|
* If a line matches this pattern, then its indentation should not be changed and it should not be evaluated against the other rules.
|
|
* If a line matches this pattern, then its indentation should not be changed and it should not be evaluated against the other rules.
|
|
*/
|
|
*/
|
|
- unIndentedLinePattern?: RegExp;
|
|
|
|
|
|
+ unIndentedLinePattern?: RegExp | null;
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -4611,10 +4622,6 @@ declare namespace monaco.languages {
|
|
* Describe what to do with the indentation.
|
|
* Describe what to do with the indentation.
|
|
*/
|
|
*/
|
|
indentAction: IndentAction;
|
|
indentAction: IndentAction;
|
|
- /**
|
|
|
|
- * Describe whether to outdent current line.
|
|
|
|
- */
|
|
|
|
- outdentCurrentLine?: boolean;
|
|
|
|
/**
|
|
/**
|
|
* Describes text to be appended after the new line and after the indentation.
|
|
* Describes text to be appended after the new line and after the indentation.
|
|
*/
|
|
*/
|
|
@@ -4777,7 +4784,7 @@ declare namespace monaco.languages {
|
|
* *Note:* The range must be a [single line](#Range.isSingleLine) and it must
|
|
* *Note:* The range must be a [single line](#Range.isSingleLine) and it must
|
|
* [contain](#Range.contains) the position at which completion has been [requested](#CompletionItemProvider.provideCompletionItems).
|
|
* [contain](#Range.contains) the position at which completion has been [requested](#CompletionItemProvider.provideCompletionItems).
|
|
*/
|
|
*/
|
|
- range?: IRange;
|
|
|
|
|
|
+ range: IRange;
|
|
/**
|
|
/**
|
|
* An optional set of characters that when pressed while this completion is active will accept it first and
|
|
* An optional set of characters that when pressed while this completion is active will accept it first and
|
|
* then type that character. *Note* that all commit characters should have `length=1` and that superfluous
|
|
* then type that character. *Note* that all commit characters should have `length=1` and that superfluous
|
|
@@ -4860,6 +4867,7 @@ declare namespace monaco.languages {
|
|
edit?: WorkspaceEdit;
|
|
edit?: WorkspaceEdit;
|
|
diagnostics?: editor.IMarkerData[];
|
|
diagnostics?: editor.IMarkerData[];
|
|
kind?: string;
|
|
kind?: string;
|
|
|
|
+ isPreferred?: boolean;
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -4921,16 +4929,17 @@ declare namespace monaco.languages {
|
|
activeParameter: number;
|
|
activeParameter: number;
|
|
}
|
|
}
|
|
|
|
|
|
- export enum SignatureHelpTriggerReason {
|
|
|
|
|
|
+ export enum SignatureHelpTriggerKind {
|
|
Invoke = 1,
|
|
Invoke = 1,
|
|
TriggerCharacter = 2,
|
|
TriggerCharacter = 2,
|
|
ContentChange = 3
|
|
ContentChange = 3
|
|
}
|
|
}
|
|
|
|
|
|
export interface SignatureHelpContext {
|
|
export interface SignatureHelpContext {
|
|
- readonly triggerReason: SignatureHelpTriggerReason;
|
|
|
|
|
|
+ readonly triggerKind: SignatureHelpTriggerKind;
|
|
readonly triggerCharacter?: string;
|
|
readonly triggerCharacter?: string;
|
|
readonly isRetrigger: boolean;
|
|
readonly isRetrigger: boolean;
|
|
|
|
+ readonly activeSignatureHelp?: SignatureHelp;
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -4977,7 +4986,7 @@ declare namespace monaco.languages {
|
|
/**
|
|
/**
|
|
* The highlight kind, default is [text](#DocumentHighlightKind.Text).
|
|
* The highlight kind, default is [text](#DocumentHighlightKind.Text).
|
|
*/
|
|
*/
|
|
- kind: DocumentHighlightKind;
|
|
|
|
|
|
+ kind?: DocumentHighlightKind;
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -5029,20 +5038,28 @@ declare namespace monaco.languages {
|
|
range: IRange;
|
|
range: IRange;
|
|
}
|
|
}
|
|
|
|
|
|
- /**
|
|
|
|
- * The definition of a symbol represented as one or many [locations](#Location).
|
|
|
|
- * For most programming languages there is only one location at which a symbol is
|
|
|
|
- * defined.
|
|
|
|
- */
|
|
|
|
- export type Definition = Location | Location[];
|
|
|
|
-
|
|
|
|
- export interface DefinitionLink {
|
|
|
|
- origin?: IRange;
|
|
|
|
|
|
+ export interface LocationLink {
|
|
|
|
+ /**
|
|
|
|
+ * A range to select where this link originates from.
|
|
|
|
+ */
|
|
|
|
+ originSelectionRange?: IRange;
|
|
|
|
+ /**
|
|
|
|
+ * The target uri this link points to.
|
|
|
|
+ */
|
|
uri: Uri;
|
|
uri: Uri;
|
|
|
|
+ /**
|
|
|
|
+ * The full range this link points to.
|
|
|
|
+ */
|
|
range: IRange;
|
|
range: IRange;
|
|
- selectionRange?: IRange;
|
|
|
|
|
|
+ /**
|
|
|
|
+ * A range to select this link points to. Must be contained
|
|
|
|
+ * in `LocationLink.range`.
|
|
|
|
+ */
|
|
|
|
+ targetSelectionRange?: IRange;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ export type Definition = Location | Location[] | LocationLink[];
|
|
|
|
+
|
|
/**
|
|
/**
|
|
* The definition provider interface defines the contract between extensions and
|
|
* The definition provider interface defines the contract between extensions and
|
|
* the [go to definition](https://code.visualstudio.com/docs/editor/editingevolved#_go-to-definition)
|
|
* the [go to definition](https://code.visualstudio.com/docs/editor/editingevolved#_go-to-definition)
|
|
@@ -5052,7 +5069,19 @@ declare namespace monaco.languages {
|
|
/**
|
|
/**
|
|
* Provide the definition of the symbol at the given position and document.
|
|
* Provide the definition of the symbol at the given position and document.
|
|
*/
|
|
*/
|
|
- provideDefinition(model: editor.ITextModel, position: Position, token: CancellationToken): ProviderResult<Definition | DefinitionLink[]>;
|
|
|
|
|
|
+ provideDefinition(model: editor.ITextModel, position: Position, token: CancellationToken): ProviderResult<Definition | LocationLink[]>;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * The definition provider interface defines the contract between extensions and
|
|
|
|
+ * the [go to definition](https://code.visualstudio.com/docs/editor/editingevolved#_go-to-definition)
|
|
|
|
+ * and peek definition features.
|
|
|
|
+ */
|
|
|
|
+ export interface DeclarationProvider {
|
|
|
|
+ /**
|
|
|
|
+ * Provide the declaration of the symbol at the given position and document.
|
|
|
|
+ */
|
|
|
|
+ provideDeclaration(model: editor.ITextModel, position: Position, token: CancellationToken): ProviderResult<Definition | LocationLink[]>;
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -5063,7 +5092,7 @@ declare namespace monaco.languages {
|
|
/**
|
|
/**
|
|
* Provide the implementation of the symbol at the given position and document.
|
|
* Provide the implementation of the symbol at the given position and document.
|
|
*/
|
|
*/
|
|
- provideImplementation(model: editor.ITextModel, position: Position, token: CancellationToken): ProviderResult<Definition | DefinitionLink[]>;
|
|
|
|
|
|
+ provideImplementation(model: editor.ITextModel, position: Position, token: CancellationToken): ProviderResult<Definition | LocationLink[]>;
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -5074,7 +5103,7 @@ declare namespace monaco.languages {
|
|
/**
|
|
/**
|
|
* Provide the type definition of the symbol at the given position and document.
|
|
* Provide the type definition of the symbol at the given position and document.
|
|
*/
|
|
*/
|
|
- provideTypeDefinition(model: editor.ITextModel, position: Position, token: CancellationToken): ProviderResult<Definition | DefinitionLink[]>;
|
|
|
|
|
|
+ provideTypeDefinition(model: editor.ITextModel, position: Position, token: CancellationToken): ProviderResult<Definition | LocationLink[]>;
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -5135,10 +5164,6 @@ declare namespace monaco.languages {
|
|
range: IRange;
|
|
range: IRange;
|
|
text: string;
|
|
text: string;
|
|
eol?: editor.EndOfLineSequence;
|
|
eol?: editor.EndOfLineSequence;
|
|
- } | {
|
|
|
|
- range: undefined;
|
|
|
|
- text: undefined;
|
|
|
|
- eol: editor.EndOfLineSequence;
|
|
|
|
};
|
|
};
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -5202,7 +5227,7 @@ declare namespace monaco.languages {
|
|
*/
|
|
*/
|
|
export interface ILink {
|
|
export interface ILink {
|
|
range: IRange;
|
|
range: IRange;
|
|
- url?: string;
|
|
|
|
|
|
+ url?: Uri | string;
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -5285,6 +5310,18 @@ declare namespace monaco.languages {
|
|
provideColorPresentations(model: editor.ITextModel, colorInfo: IColorInformation, token: CancellationToken): ProviderResult<IColorPresentation[]>;
|
|
provideColorPresentations(model: editor.ITextModel, colorInfo: IColorInformation, token: CancellationToken): ProviderResult<IColorPresentation[]>;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ export interface SelectionRange {
|
|
|
|
+ kind: string;
|
|
|
|
+ range: IRange;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ export interface SelectionRangeProvider {
|
|
|
|
+ /**
|
|
|
|
+ * Provide ranges that should be selected from the given position.
|
|
|
|
+ */
|
|
|
|
+ provideSelectionRanges(model: editor.ITextModel, positions: Position[], token: CancellationToken): ProviderResult<SelectionRange[][]>;
|
|
|
|
+ }
|
|
|
|
+
|
|
export interface FoldingContext {
|
|
export interface FoldingContext {
|
|
}
|
|
}
|
|
|
|
|
|
@@ -5357,7 +5394,7 @@ declare namespace monaco.languages {
|
|
}
|
|
}
|
|
|
|
|
|
export interface WorkspaceEdit {
|
|
export interface WorkspaceEdit {
|
|
- edits?: Array<ResourceTextEdit | ResourceFileEdit>;
|
|
|
|
|
|
+ edits: Array<ResourceTextEdit | ResourceFileEdit>;
|
|
}
|
|
}
|
|
|
|
|
|
export interface Rejection {
|
|
export interface Rejection {
|
|
@@ -5549,6 +5586,7 @@ declare namespace monaco.worker {
|
|
|
|
|
|
//dtsv=2
|
|
//dtsv=2
|
|
|
|
|
|
|
|
+
|
|
declare namespace monaco.languages.typescript {
|
|
declare namespace monaco.languages.typescript {
|
|
|
|
|
|
enum ModuleKind {
|
|
enum ModuleKind {
|