|
@@ -111,6 +111,7 @@ declare module monaco {
|
|
|
*
|
|
|
*/
|
|
|
export class Uri {
|
|
|
+ static isUri(thing: any): thing is Uri;
|
|
|
constructor();
|
|
|
/**
|
|
|
* scheme is the 'http' part of 'http://www.msft.com/some/path?query#fragment'.
|
|
@@ -883,22 +884,23 @@ declare module monaco.editor {
|
|
|
|
|
|
export interface IStandaloneCodeEditor extends ICodeEditor {
|
|
|
addCommand(keybinding: number, handler: ICommandHandler, context: string): string;
|
|
|
- createContextKey<T>(key: string, defaultValue: T): IKeybindingContextKey<T>;
|
|
|
+ createContextKey<T>(key: string, defaultValue: T): IContextKey<T>;
|
|
|
addAction(descriptor: IActionDescriptor): void;
|
|
|
}
|
|
|
|
|
|
export interface IStandaloneDiffEditor extends IDiffEditor {
|
|
|
addCommand(keybinding: number, handler: ICommandHandler, context: string): string;
|
|
|
- createContextKey<T>(key: string, defaultValue: T): IKeybindingContextKey<T>;
|
|
|
+ createContextKey<T>(key: string, defaultValue: T): IContextKey<T>;
|
|
|
addAction(descriptor: IActionDescriptor): void;
|
|
|
}
|
|
|
export interface ICommandHandler {
|
|
|
(...args: any[]): void;
|
|
|
}
|
|
|
|
|
|
- export interface IKeybindingContextKey<T> {
|
|
|
+ export interface IContextKey<T> {
|
|
|
set(value: T): void;
|
|
|
reset(): void;
|
|
|
+ get(): T;
|
|
|
}
|
|
|
|
|
|
export interface IEditorOverrideServices {
|
|
@@ -926,6 +928,7 @@ declare module monaco.editor {
|
|
|
theme?: string;
|
|
|
mimeType?: string;
|
|
|
}
|
|
|
+
|
|
|
export enum ScrollbarVisibility {
|
|
|
Auto = 1,
|
|
|
Hidden = 2,
|
|
@@ -965,7 +968,7 @@ declare module monaco.editor {
|
|
|
horizontal?: string;
|
|
|
/**
|
|
|
* Cast horizontal and vertical shadows when the content is scrolled.
|
|
|
- * Defaults to false.
|
|
|
+ * Defaults to true.
|
|
|
*/
|
|
|
useShadows?: boolean;
|
|
|
/**
|
|
@@ -1113,10 +1116,15 @@ declare module monaco.editor {
|
|
|
*/
|
|
|
overviewRulerLanes?: number;
|
|
|
/**
|
|
|
- * Control the cursor blinking animation.
|
|
|
+ * Control the cursor animation style, possible values are 'blink', 'smooth', 'phase', 'expand' and 'solid'.
|
|
|
* Defaults to 'blink'.
|
|
|
*/
|
|
|
cursorBlinking?: string;
|
|
|
+ /**
|
|
|
+ * Zoom the font in the editor when using the mouse wheel in combination with holding Ctrl.
|
|
|
+ * Defaults to false.
|
|
|
+ */
|
|
|
+ mouseWheelZoom?: boolean;
|
|
|
/**
|
|
|
* Control the cursor style, either 'block' or 'line'.
|
|
|
* Defaults to 'line'.
|
|
@@ -1156,6 +1164,12 @@ declare module monaco.editor {
|
|
|
* Defaults to 300.
|
|
|
*/
|
|
|
wrappingColumn?: number;
|
|
|
+ /**
|
|
|
+ * Control the alternate style of viewport wrapping.
|
|
|
+ * When set to true viewport wrapping is used only when the window width is less than the number of columns specified in the wrappingColumn property. Has no effect if wrappingColumn is not a positive number.
|
|
|
+ * Defaults to false.
|
|
|
+ */
|
|
|
+ wordWrap?: boolean;
|
|
|
/**
|
|
|
* Control indentation of wrapped lines. Can be: 'none', 'same' or 'indent'.
|
|
|
* Defaults to 'none'.
|
|
@@ -1176,13 +1190,6 @@ declare module monaco.editor {
|
|
|
* Defaults to '.'.
|
|
|
*/
|
|
|
wordWrapBreakObtrusiveCharacters?: string;
|
|
|
- /**
|
|
|
- * Control what pressing Tab does.
|
|
|
- * If it is false, pressing Tab or Shift-Tab will be handled by the editor.
|
|
|
- * If it is true, pressing Tab or Shift-Tab will move the browser focus.
|
|
|
- * Defaults to false.
|
|
|
- */
|
|
|
- tabFocusMode?: boolean;
|
|
|
/**
|
|
|
* Performance guard: Stop rendering a line after x characters.
|
|
|
* Defaults to 10000 if wrappingColumn is -1. Defaults to -1 if wrappingColumn is >= 0.
|
|
@@ -1205,7 +1212,7 @@ declare module monaco.editor {
|
|
|
*/
|
|
|
mouseWheelScrollSensitivity?: number;
|
|
|
/**
|
|
|
- * Enable quick suggestions (shaddow suggestions)
|
|
|
+ * Enable quick suggestions (shadow suggestions)
|
|
|
* Defaults to true.
|
|
|
*/
|
|
|
quickSuggestions?: boolean;
|
|
@@ -1243,21 +1250,28 @@ declare module monaco.editor {
|
|
|
* Defaults to true.
|
|
|
*/
|
|
|
acceptSuggestionOnEnter?: boolean;
|
|
|
+ /**
|
|
|
+ * Enable snippet suggestions. Default to 'true'.
|
|
|
+ */
|
|
|
+ snippetSuggestions?: 'top' | 'bottom' | 'inline' | 'none';
|
|
|
+ /**
|
|
|
+ * Enable tab completion. Defaults to 'false'
|
|
|
+ */
|
|
|
+ tabCompletion?: boolean;
|
|
|
+ /**
|
|
|
+ * Enable word based suggestions. Defaults to 'true'
|
|
|
+ */
|
|
|
+ wordBasedSuggestions?: boolean;
|
|
|
/**
|
|
|
* Enable selection highlight.
|
|
|
* Defaults to true.
|
|
|
*/
|
|
|
selectionHighlight?: boolean;
|
|
|
/**
|
|
|
- * Show lines before classes and methods (based on outline info).
|
|
|
- * Defaults to false.
|
|
|
- */
|
|
|
- outlineMarkers?: boolean;
|
|
|
- /**
|
|
|
- * Show reference infos (a.k.a. code lenses) for modes that support it
|
|
|
+ * Show code lens
|
|
|
* Defaults to true.
|
|
|
*/
|
|
|
- referenceInfos?: boolean;
|
|
|
+ codeLens?: boolean;
|
|
|
/**
|
|
|
* Enable code folding
|
|
|
* Defaults to true.
|
|
@@ -1268,11 +1282,21 @@ declare module monaco.editor {
|
|
|
* Defaults to false.
|
|
|
*/
|
|
|
renderWhitespace?: boolean;
|
|
|
+ /**
|
|
|
+ * Enable rendering of control characters.
|
|
|
+ * Defaults to false.
|
|
|
+ */
|
|
|
+ renderControlCharacters?: boolean;
|
|
|
/**
|
|
|
* Enable rendering of indent guides.
|
|
|
+ * Defaults to false.
|
|
|
+ */
|
|
|
+ renderIndentGuides?: boolean;
|
|
|
+ /**
|
|
|
+ * Enable rendering of current line highlight.
|
|
|
* Defaults to true.
|
|
|
*/
|
|
|
- indentGuides?: boolean;
|
|
|
+ renderLineHighlight?: boolean;
|
|
|
/**
|
|
|
* Inserting and deleting whitespace follows tab stops.
|
|
|
*/
|
|
@@ -1281,6 +1305,10 @@ declare module monaco.editor {
|
|
|
* The font family
|
|
|
*/
|
|
|
fontFamily?: string;
|
|
|
+ /**
|
|
|
+ * The font weight
|
|
|
+ */
|
|
|
+ fontWeight?: 'normal' | 'bold' | 'bolder' | 'lighter' | 'initial' | 'inherit' | '100' | '200' | '300' | '400' | '500' | '600' | '700' | '800' | '900';
|
|
|
/**
|
|
|
* The font size
|
|
|
*/
|
|
@@ -1356,14 +1384,17 @@ declare module monaco.editor {
|
|
|
revealHorizontalRightPadding: number;
|
|
|
roundedSelection: boolean;
|
|
|
overviewRulerLanes: number;
|
|
|
- cursorBlinking: string;
|
|
|
+ cursorBlinking: TextEditorCursorBlinkingStyle;
|
|
|
+ mouseWheelZoom: boolean;
|
|
|
cursorStyle: TextEditorCursorStyle;
|
|
|
hideCursorInOverviewRuler: boolean;
|
|
|
scrollBeyondLastLine: boolean;
|
|
|
editorClassName: string;
|
|
|
stopRenderingLineAfter: number;
|
|
|
renderWhitespace: boolean;
|
|
|
- indentGuides: boolean;
|
|
|
+ renderControlCharacters: boolean;
|
|
|
+ renderIndentGuides: boolean;
|
|
|
+ renderLineHighlight: boolean;
|
|
|
scrollbar: InternalEditorScrollbarOptions;
|
|
|
}
|
|
|
|
|
@@ -1380,13 +1411,16 @@ declare module monaco.editor {
|
|
|
roundedSelection: boolean;
|
|
|
overviewRulerLanes: boolean;
|
|
|
cursorBlinking: boolean;
|
|
|
+ mouseWheelZoom: boolean;
|
|
|
cursorStyle: boolean;
|
|
|
hideCursorInOverviewRuler: boolean;
|
|
|
scrollBeyondLastLine: boolean;
|
|
|
editorClassName: boolean;
|
|
|
stopRenderingLineAfter: boolean;
|
|
|
renderWhitespace: boolean;
|
|
|
- indentGuides: boolean;
|
|
|
+ renderControlCharacters: boolean;
|
|
|
+ renderIndentGuides: boolean;
|
|
|
+ renderLineHighlight: boolean;
|
|
|
scrollbar: boolean;
|
|
|
}
|
|
|
|
|
@@ -1401,9 +1435,11 @@ declare module monaco.editor {
|
|
|
formatOnType: boolean;
|
|
|
suggestOnTriggerCharacters: boolean;
|
|
|
acceptSuggestionOnEnter: boolean;
|
|
|
+ snippetSuggestions: 'top' | 'bottom' | 'inline' | 'none';
|
|
|
+ tabCompletion: boolean;
|
|
|
+ wordBasedSuggestions: boolean;
|
|
|
selectionHighlight: boolean;
|
|
|
- outlineMarkers: boolean;
|
|
|
- referenceInfos: boolean;
|
|
|
+ codeLens: boolean;
|
|
|
folding: boolean;
|
|
|
}
|
|
|
|
|
@@ -2552,38 +2588,6 @@ declare module monaco.editor {
|
|
|
height: number;
|
|
|
}
|
|
|
|
|
|
- /**
|
|
|
- * Conditions describing action enablement
|
|
|
- */
|
|
|
- export interface IActionEnablement {
|
|
|
- /**
|
|
|
- * The action is enabled only if text in the editor is focused (e.g. blinking cursor).
|
|
|
- * Warning: This condition will be disabled if the action is marked to be displayed in the context menu
|
|
|
- * Defaults to false.
|
|
|
- */
|
|
|
- textFocus?: boolean;
|
|
|
- /**
|
|
|
- * The action is enabled only if the editor or its widgets have focus (e.g. focus is in find widget).
|
|
|
- * Defaults to false.
|
|
|
- */
|
|
|
- widgetFocus?: boolean;
|
|
|
- /**
|
|
|
- * The action is enabled only if the editor is not in read only mode.
|
|
|
- * Defaults to false.
|
|
|
- */
|
|
|
- writeableEditor?: boolean;
|
|
|
- /**
|
|
|
- * The action is enabled only if the cursor position is over tokens of a certain kind.
|
|
|
- * Defaults to no tokens required.
|
|
|
- */
|
|
|
- tokensAtPosition?: string[];
|
|
|
- /**
|
|
|
- * The action is enabled only if the cursor position is over a word (i.e. not whitespace).
|
|
|
- * Defaults to false.
|
|
|
- */
|
|
|
- wordAtPosition?: boolean;
|
|
|
- }
|
|
|
-
|
|
|
/**
|
|
|
* A (serializable) state of the cursors.
|
|
|
*/
|
|
@@ -2720,34 +2724,10 @@ declare module monaco.editor {
|
|
|
charChanges: ICharChange[];
|
|
|
}
|
|
|
|
|
|
- /**
|
|
|
- * A context key that is set when the editor's text has focus (cursor is blinking).
|
|
|
- */
|
|
|
- export const KEYBINDING_CONTEXT_EDITOR_TEXT_FOCUS: string;
|
|
|
-
|
|
|
- /**
|
|
|
- * A context key that is set when the editor's text or an editor's widget has focus.
|
|
|
- */
|
|
|
- export const KEYBINDING_CONTEXT_EDITOR_FOCUS: string;
|
|
|
-
|
|
|
- /**
|
|
|
- * A context key that is set when the editor has multiple selections (multiple cursors).
|
|
|
- */
|
|
|
- export const KEYBINDING_CONTEXT_EDITOR_HAS_MULTIPLE_SELECTIONS: string;
|
|
|
-
|
|
|
- /**
|
|
|
- * A context key that is set when the editor has a non-collapsed selection.
|
|
|
- */
|
|
|
- export const KEYBINDING_CONTEXT_EDITOR_HAS_NON_EMPTY_SELECTION: string;
|
|
|
-
|
|
|
- /**
|
|
|
- * A context key that is set to the language associated with the model associated with the editor.
|
|
|
- */
|
|
|
- export const KEYBINDING_CONTEXT_EDITOR_LANGUAGE_ID: string;
|
|
|
-
|
|
|
export class BareFontInfo {
|
|
|
_bareFontInfoBrand: void;
|
|
|
fontFamily: string;
|
|
|
+ fontWeight: string;
|
|
|
fontSize: number;
|
|
|
lineHeight: number;
|
|
|
}
|
|
@@ -2785,21 +2765,6 @@ declare module monaco.editor {
|
|
|
* The keybinding rule.
|
|
|
*/
|
|
|
keybindingContext?: string;
|
|
|
- /**
|
|
|
- * A set of enablement conditions.
|
|
|
- */
|
|
|
- enablement?: IActionEnablement;
|
|
|
- /**
|
|
|
- * Control if the action should show up in the context menu and where.
|
|
|
- * Built-in groups:
|
|
|
- * 1_goto/* => e.g. 1_goto/1_peekDefinition
|
|
|
- * 2_change/* => e.g. 2_change/2_format
|
|
|
- * 3_edit/* => e.g. 3_edit/1_copy
|
|
|
- * 4_tools/* => e.g. 4_tools/1_commands
|
|
|
- * You can also create your own group.
|
|
|
- * Defaults to null (don't show in context menu).
|
|
|
- */
|
|
|
- contextMenuGroupId?: string;
|
|
|
/**
|
|
|
* Method that will be executed when the action is triggered.
|
|
|
* @param editor The editor instance is passed in as a convinience
|
|
@@ -2807,6 +2772,14 @@ declare module monaco.editor {
|
|
|
run: (editor: ICommonCodeEditor) => Promise<void>;
|
|
|
}
|
|
|
|
|
|
+ export interface IEditorAction {
|
|
|
+ id: string;
|
|
|
+ label: string;
|
|
|
+ alias: string;
|
|
|
+ isSupported(): boolean;
|
|
|
+ run(): Promise<void>;
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* An editor.
|
|
|
*/
|
|
@@ -2876,7 +2849,11 @@ declare module monaco.editor {
|
|
|
/**
|
|
|
* Returns all actions associated with this editor.
|
|
|
*/
|
|
|
- getActions(): IAction[];
|
|
|
+ getActions(): IEditorAction[];
|
|
|
+ /**
|
|
|
+ * Returns all actions associated with this editor.
|
|
|
+ */
|
|
|
+ getSupportedActions(): IEditorAction[];
|
|
|
/**
|
|
|
* Saves current view state of the editor in a serializable object.
|
|
|
*/
|
|
@@ -3057,7 +3034,7 @@ declare module monaco.editor {
|
|
|
* @id Unique identifier of the contribution.
|
|
|
* @return The contribution or null if contribution not found.
|
|
|
*/
|
|
|
- getContribution(id: string): IEditorContribution;
|
|
|
+ getContribution<T extends IEditorContribution>(id: string): T;
|
|
|
/**
|
|
|
* Type the getModel() of IEditor.
|
|
|
*/
|
|
@@ -3112,13 +3089,17 @@ declare module monaco.editor {
|
|
|
* @id Unique identifier of the contribution.
|
|
|
* @return The action or null if action not found.
|
|
|
*/
|
|
|
- getAction(id: string): IAction;
|
|
|
+ getAction(id: string): IEditorAction;
|
|
|
/**
|
|
|
* Execute a command on the editor.
|
|
|
* @param source The source of the call.
|
|
|
* @param command The command to execute
|
|
|
*/
|
|
|
executeCommand(source: string, command: ICommand): void;
|
|
|
+ /**
|
|
|
+ * Push an "undo stop" in the undo-redo stack.
|
|
|
+ */
|
|
|
+ pushUndoStop(): boolean;
|
|
|
/**
|
|
|
* Execute a command on the editor.
|
|
|
* @param source The source of the call.
|
|
@@ -3184,6 +3165,90 @@ declare module monaco.editor {
|
|
|
IDiffEditor: string;
|
|
|
};
|
|
|
|
|
|
+ /**
|
|
|
+ * Positions in the view for cursor move command.
|
|
|
+ */
|
|
|
+ export const CursorMovePosition: {
|
|
|
+ Left: string;
|
|
|
+ Right: string;
|
|
|
+ Up: string;
|
|
|
+ Down: string;
|
|
|
+ WrappedLineStart: string;
|
|
|
+ WrappedLineFirstNonWhitespaceCharacter: string;
|
|
|
+ WrappedLineColumnCenter: string;
|
|
|
+ WrappedLineEnd: string;
|
|
|
+ WrappedLineLastNonWhitespaceCharacter: string;
|
|
|
+ ViewPortTop: string;
|
|
|
+ ViewPortCenter: string;
|
|
|
+ ViewPortBottom: string;
|
|
|
+ ViewPortIfOutside: string;
|
|
|
+ };
|
|
|
+
|
|
|
+ /**
|
|
|
+ * Units for Cursor move 'by' argument
|
|
|
+ */
|
|
|
+ export const CursorMoveByUnit: {
|
|
|
+ Line: string;
|
|
|
+ WrappedLine: string;
|
|
|
+ Character: string;
|
|
|
+ HalfLine: string;
|
|
|
+ };
|
|
|
+
|
|
|
+ /**
|
|
|
+ * Arguments for Cursor move command
|
|
|
+ */
|
|
|
+ export interface CursorMoveArguments {
|
|
|
+ to: string;
|
|
|
+ select?: boolean;
|
|
|
+ by?: string;
|
|
|
+ value?: number;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * Directions in the view for editor scroll command.
|
|
|
+ */
|
|
|
+ export const EditorScrollDirection: {
|
|
|
+ Up: string;
|
|
|
+ Down: string;
|
|
|
+ };
|
|
|
+
|
|
|
+ /**
|
|
|
+ * Units for editor scroll 'by' argument
|
|
|
+ */
|
|
|
+ export const EditorScrollByUnit: {
|
|
|
+ Line: string;
|
|
|
+ WrappedLine: string;
|
|
|
+ Page: string;
|
|
|
+ HalfPage: string;
|
|
|
+ };
|
|
|
+
|
|
|
+ /**
|
|
|
+ * Arguments for editor scroll command
|
|
|
+ */
|
|
|
+ export interface EditorScrollArguments {
|
|
|
+ to: string;
|
|
|
+ by?: string;
|
|
|
+ value?: number;
|
|
|
+ revealCursor?: boolean;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * Arguments for reveal line command
|
|
|
+ */
|
|
|
+ export interface RevealLineArguments {
|
|
|
+ lineNumber?: number;
|
|
|
+ at?: string;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * Values for reveal line 'at' argument
|
|
|
+ */
|
|
|
+ export const RevealLineAtArgument: {
|
|
|
+ Top: string;
|
|
|
+ Center: string;
|
|
|
+ Bottom: string;
|
|
|
+ };
|
|
|
+
|
|
|
/**
|
|
|
* Built-in commands.
|
|
|
*/
|
|
@@ -3229,6 +3294,7 @@ declare module monaco.editor {
|
|
|
CursorColumnSelectPageUp: string;
|
|
|
CursorColumnSelectDown: string;
|
|
|
CursorColumnSelectPageDown: string;
|
|
|
+ CursorMove: string;
|
|
|
AddCursorDown: string;
|
|
|
AddCursorUp: string;
|
|
|
CursorUndo: string;
|
|
@@ -3240,6 +3306,8 @@ declare module monaco.editor {
|
|
|
JumpToBracket: string;
|
|
|
Type: string;
|
|
|
ReplacePreviousChar: string;
|
|
|
+ CompositionStart: string;
|
|
|
+ CompositionEnd: string;
|
|
|
Paste: string;
|
|
|
Tab: string;
|
|
|
Indent: string;
|
|
@@ -3270,10 +3338,12 @@ declare module monaco.editor {
|
|
|
LineInsertAfter: string;
|
|
|
LineBreakInsert: string;
|
|
|
SelectAll: string;
|
|
|
+ EditorScroll: string;
|
|
|
ScrollLineUp: string;
|
|
|
ScrollLineDown: string;
|
|
|
ScrollPageUp: string;
|
|
|
ScrollPageDown: string;
|
|
|
+ RevealLine: string;
|
|
|
};
|
|
|
|
|
|
/**
|
|
@@ -3294,6 +3364,36 @@ declare module monaco.editor {
|
|
|
Underline = 3,
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * The kind of animation in which the editor's cursor should be rendered.
|
|
|
+ */
|
|
|
+ export enum TextEditorCursorBlinkingStyle {
|
|
|
+ /**
|
|
|
+ * Hidden
|
|
|
+ */
|
|
|
+ Hidden = 0,
|
|
|
+ /**
|
|
|
+ * Blinking
|
|
|
+ */
|
|
|
+ Blink = 1,
|
|
|
+ /**
|
|
|
+ * Blinking with smooth fading
|
|
|
+ */
|
|
|
+ Smooth = 2,
|
|
|
+ /**
|
|
|
+ * Blinking with prolonged filled state and smooth fading
|
|
|
+ */
|
|
|
+ Phase = 3,
|
|
|
+ /**
|
|
|
+ * Expand collapse animation on the y axis
|
|
|
+ */
|
|
|
+ Expand = 4,
|
|
|
+ /**
|
|
|
+ * No-Blinking
|
|
|
+ */
|
|
|
+ Solid = 5,
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* A view zone is a full horizontal rectangle that 'pushes' text down.
|
|
|
* The editor reserves space for view zones when rendering.
|
|
@@ -3404,6 +3504,7 @@ declare module monaco.editor {
|
|
|
* Render this content widget in a location where it could overflow the editor's view dom node.
|
|
|
*/
|
|
|
allowEditorOverflow?: boolean;
|
|
|
+ suppressMouseDown?: boolean;
|
|
|
/**
|
|
|
* Get a unique identifier of the content widget.
|
|
|
*/
|
|
@@ -3891,8 +3992,8 @@ declare module monaco.languages {
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * The language configuration interfaces defines the contract between extensions
|
|
|
- * and various editor features, like automatic bracket insertion, automatic indentation etc.
|
|
|
+ * The language configuration interface defines the contract between extensions and
|
|
|
+ * various editor features, like automatic bracket insertion, automatic indentation etc.
|
|
|
*/
|
|
|
export interface LanguageConfiguration {
|
|
|
/**
|
|
@@ -4393,6 +4494,7 @@ declare module monaco.languages {
|
|
|
*/
|
|
|
export interface LinkProvider {
|
|
|
provideLinks(model: editor.IReadOnlyModel, token: CancellationToken): ILink[] | Thenable<ILink[]>;
|
|
|
+ resolveLink?: (link: ILink, token: CancellationToken) => ILink | Thenable<ILink>;
|
|
|
}
|
|
|
|
|
|
export interface IResourceEdit {
|
|
@@ -4724,17 +4826,43 @@ declare module monaco.languages.typescript {
|
|
|
}
|
|
|
|
|
|
export interface LanguageServiceDefaults {
|
|
|
- onDidChange: IEvent<LanguageServiceDefaults>;
|
|
|
- extraLibs: { [path:string]: string; };
|
|
|
+ /**
|
|
|
+ * Add an additional source file to the language service. Use this
|
|
|
+ * for typescript (definition) files that won't be loaded as editor
|
|
|
+ * document, like `jquery.d.ts`.
|
|
|
+ *
|
|
|
+ * @param content The file content
|
|
|
+ * @param filePath An optional file path
|
|
|
+ * @returns A disposabled which will remove the file from the
|
|
|
+ * language service upon disposal.
|
|
|
+ */
|
|
|
addExtraLib(content: string, filePath?: string): IDisposable;
|
|
|
- compilerOptions: CompilerOptions;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * Set TypeScript compiler options.
|
|
|
+ */
|
|
|
setCompilerOptions(options: CompilerOptions): void;
|
|
|
- diagnosticsOptions: DiagnosticsOptions;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * Configure whether syntactic and/or semantic validation should
|
|
|
+ * be performed
|
|
|
+ */
|
|
|
setDiagnosticsOptions(options: DiagnosticsOptions): void;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * Configure when the worker shuts down. By default that is 2mins.
|
|
|
+ *
|
|
|
+ * @param value The maximun idle time in milliseconds. Values less than one
|
|
|
+ * mean never shut down.
|
|
|
+ */
|
|
|
+ setMaximunWorkerIdleTime(value: number): void;
|
|
|
}
|
|
|
|
|
|
export var typescriptDefaults: LanguageServiceDefaults;
|
|
|
export var javascriptDefaults: LanguageServiceDefaults;
|
|
|
+
|
|
|
+ export var getTypeScriptWorker: () => monaco.Promise<any>;
|
|
|
+ export var getJavaScriptWorker: () => monaco.Promise<any>;
|
|
|
}
|
|
|
|
|
|
/*---------------------------------------------------------------------------------------------
|