Alex Dima пре 6 година
родитељ
комит
0c045ae782
5 измењених фајлова са 298 додато и 181 уклоњено
  1. 41 0
      CHANGELOG.md
  2. 111 73
      monaco.d.ts
  3. 29 29
      package-lock.json
  4. 6 6
      package.json
  5. 111 73
      website/playground/monaco.d.ts.txt

+ 41 - 0
CHANGELOG.md

@@ -1,5 +1,46 @@
 # Monaco Editor Changelog
 # Monaco Editor Changelog
 
 
+## [0.16.0] (05.03.2018)
+
+### New & Noteworthy
+
+* Added built-in support for AMD cross-domain web worker loading.
+* Added API to remeasure fonts (`monaco.editor.remeasureFonts`) in case custom fonts are used and the editor is painted at a time when the fonts are not finished loading.
+* Various editor improvements, such as an option to `renderFinalNewline`, or to have a `cursorSmoothCaretAnimation`
+* Colorization support for Tcl, Pascal, Kotlin and GraphQL.
+
+### Breaking changes
+
+* We are no longer shipping WinJS.Promise, but we are shipping with a Promise shim (for IE11).
+* `CompletionItem.range` is now mandatory. Most times, you can use `model.getWordUntilPosition()` to get a good range.
+* `DefinitionLink` has been renamed to `LocationLink` and a couple of its fields have also been renamed.
+
+### Thank you
+
+Contributions to `monaco-editor`:
+
+* [Sebastián Gurin (@cancerberoSgx)](https://github.com/cancerberoSgx): fix worker paths in parcel [PR #1339](https://github.com/Microsoft/monaco-editor/pull/1339)
+* [@datou0412](https://github.com/datou0412): Fix lineDecoration example css error [PR #1337](https://github.com/Microsoft/monaco-editor/pull/1337)
+* [Joshua Sullivan (@jbsulli)](https://github.com/jbsulli): Fix JavaScript RegExp range closing bracket [PR #1329](https://github.com/Microsoft/monaco-editor/pull/1329)
+* [Krish De Souza (@Kedstar99)](https://github.com/Kedstar99): Fixed various HTML errors with the various webpages [PR #1309](https://github.com/Microsoft/monaco-editor/pull/1309)
+* [Swarnava Sengupta (@swarnava)](https://github.com/swarnava): Make copyright year dynamic [PR #1303](https://github.com/Microsoft/monaco-editor/pull/1303)
+
+Contributions to `monaco-languages`:
+
+* [alan.invents (@ALANVF)](https://github.com/ALANVF): Add Tcl support [PR #59](https://github.com/Microsoft/monaco-languages/pull/59)
+* [Alessandro Fragnani (@alefragnani)](https://github.com/alefragnani): Pascal language support [PR #60](https://github.com/Microsoft/monaco-languages/pull/60)
+* [Brijesh Bittu (@brijeshb42)](https://github.com/brijeshb42): Update ruby auto indentation rules [PR #58](https://github.com/Microsoft/monaco-languages/pull/58)
+* [Andrew (@creativedrewy)](https://github.com/creativedrewy): Add Kotlin Language Support [PR #57](https://github.com/Microsoft/monaco-languages/pull/57)
+* [Salam Elbilig (@finalfantasia)](https://github.com/finalfantasia): [clojure] Improve the regular expressions for various symbols [PR #56](https://github.com/Microsoft/monaco-languages/pull/56)
+* [Neil Jones (@futurejones)](https://github.com/futurejones): Solidity - add "constructor" to main keywords [PR #55](https://github.com/Microsoft/monaco-languages/pull/55)
+* [Pavel Lang (@langpavel)](https://github.com/langpavel): GraphQL language support [PR #54](https://github.com/Microsoft/monaco-languages/pull/54)
+* [Samuel Helms (@samghelms)](https://github.com/samghelms): allows annotation in markdown language block headers [PR #61](https://github.com/Microsoft/monaco-languages/pull/61)
+
+Contributions to `monaco-typescript`:
+
+* [Olga Lesnikova (@Geloosa)](https://github.com/Geloosa): more safe extra lib filePath generation [PR #29](https://github.com/Microsoft/monaco-typescript/pull/29)
+* [Stefan Lacatus (@stefan-lacatus)](https://github.com/stefan-lacatus): Optimize how external libs are handled and allow for custom languages [PR #30](https://github.com/Microsoft/monaco-typescript/pull/30)
+
 ## [0.15.6] (23.11.2018)
 ## [0.15.6] (23.11.2018)
 * Fixes issue with context menu (https://github.com/Microsoft/monaco-editor/issues/1199)
 * Fixes issue with context menu (https://github.com/Microsoft/monaco-editor/issues/1199)
 
 

+ 111 - 73
monaco.d.ts

@@ -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 {

+ 29 - 29
package-lock.json

@@ -126,7 +126,7 @@
     },
     },
     "ansi-colors": {
     "ansi-colors": {
       "version": "1.1.0",
       "version": "1.1.0",
-      "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-1.1.0.tgz",
+      "resolved": "http://registry.npmjs.org/ansi-colors/-/ansi-colors-1.1.0.tgz",
       "integrity": "sha512-SFKX67auSNoVR38N3L+nvsPjOE0bybKTYbkf5tRvushrAPQ9V75huw0ZxBkKVeRU9kqH3d6HA4xTckbwZ4ixmA==",
       "integrity": "sha512-SFKX67auSNoVR38N3L+nvsPjOE0bybKTYbkf5tRvushrAPQ9V75huw0ZxBkKVeRU9kqH3d6HA4xTckbwZ4ixmA==",
       "dev": true,
       "dev": true,
       "requires": {
       "requires": {
@@ -1007,7 +1007,7 @@
     },
     },
     "duplexer": {
     "duplexer": {
       "version": "0.1.1",
       "version": "0.1.1",
-      "resolved": "https://registry.npmjs.org/duplexer/-/duplexer-0.1.1.tgz",
+      "resolved": "http://registry.npmjs.org/duplexer/-/duplexer-0.1.1.tgz",
       "integrity": "sha1-rOb/gIwc5mtX0ev5eXessCM0z8E=",
       "integrity": "sha1-rOb/gIwc5mtX0ev5eXessCM0z8E=",
       "dev": true
       "dev": true
     },
     },
@@ -1167,7 +1167,7 @@
     },
     },
     "event-stream": {
     "event-stream": {
       "version": "3.3.4",
       "version": "3.3.4",
-      "resolved": "https://registry.npmjs.org/event-stream/-/event-stream-3.3.4.tgz",
+      "resolved": "http://registry.npmjs.org/event-stream/-/event-stream-3.3.4.tgz",
       "integrity": "sha1-SrTJoPWlTbkzi0w02Gv86PSzVXE=",
       "integrity": "sha1-SrTJoPWlTbkzi0w02Gv86PSzVXE=",
       "dev": true,
       "dev": true,
       "requires": {
       "requires": {
@@ -2963,7 +2963,7 @@
     },
     },
     "map-stream": {
     "map-stream": {
       "version": "0.1.0",
       "version": "0.1.0",
-      "resolved": "https://registry.npmjs.org/map-stream/-/map-stream-0.1.0.tgz",
+      "resolved": "http://registry.npmjs.org/map-stream/-/map-stream-0.1.0.tgz",
       "integrity": "sha1-5WqpTEyAVaFkBKBnS3jyFffI4ZQ=",
       "integrity": "sha1-5WqpTEyAVaFkBKBnS3jyFffI4ZQ=",
       "dev": true
       "dev": true
     },
     },
@@ -3090,39 +3090,39 @@
       }
       }
     },
     },
     "monaco-css": {
     "monaco-css": {
-      "version": "2.3.0",
-      "resolved": "https://registry.npmjs.org/monaco-css/-/monaco-css-2.3.0.tgz",
-      "integrity": "sha512-LIA9osCeheJgU+b4a6RRWR7dEkSvAR4swPP3Q4jCqWOwo2L/qQCdhq9HjsU6cGH/X8rXWTRmeNNbP0wm3MoeWQ==",
+      "version": "2.5.0",
+      "resolved": "https://registry.npmjs.org/monaco-css/-/monaco-css-2.5.0.tgz",
+      "integrity": "sha512-V5YuMysU5MbNMPlZxMfB4os/mx+nIH3emrl2zgQe7Iu77dQhODoUysd5OoZB9hzpFoRDZ/KFuEaFaib8/ziYRQ==",
       "dev": true
       "dev": true
     },
     },
     "monaco-editor-core": {
     "monaco-editor-core": {
-      "version": "0.15.5",
-      "resolved": "https://registry.npmjs.org/monaco-editor-core/-/monaco-editor-core-0.15.5.tgz",
-      "integrity": "sha512-kM3KHRjj16cFdK5Z0EppKUu793JVMpsEesBSWlqdgrxcmjyDMXV6xK0oatPcAYp3eOfbbyjPhruxDXj85FKyIg==",
+      "version": "0.16.0",
+      "resolved": "https://registry.npmjs.org/monaco-editor-core/-/monaco-editor-core-0.16.0.tgz",
+      "integrity": "sha512-8tm8vq0SVuQ+VXZFtPIEIronK3102SYCWe8wviWu/5TV4zlDQcf4YdzI6A4CrNqbUc46dD0ngijaKWoRSViI8g==",
       "dev": true
       "dev": true
     },
     },
     "monaco-html": {
     "monaco-html": {
-      "version": "2.3.0",
-      "resolved": "https://registry.npmjs.org/monaco-html/-/monaco-html-2.3.0.tgz",
-      "integrity": "sha512-sMRDVYqA1XC5LbGIRIr36TnPJ8ue0LOOPQAqnnk62ZG9aLFnoLJ25K8OFBcqi83qtD8vik+T1cnFWVOdtTln+w==",
+      "version": "2.5.0",
+      "resolved": "https://registry.npmjs.org/monaco-html/-/monaco-html-2.5.0.tgz",
+      "integrity": "sha512-XPfxgoUooqJ14Zf/Xxr4lfskzzwZRhfwEGmNNeRYYfN6zC9VwBhGjAIx1OQbhtZuK/W3vmL5CLRlKQ+0NpjXJw==",
       "dev": true
       "dev": true
     },
     },
     "monaco-json": {
     "monaco-json": {
-      "version": "2.3.0",
-      "resolved": "https://registry.npmjs.org/monaco-json/-/monaco-json-2.3.0.tgz",
-      "integrity": "sha512-UqND3J8D1K8fI2YLWqvvIurOt+QCw7Bdv6hXL0xO/fz0poI02XhGpKRty/O27nHuYAoiMZRj7Zgn5YUypkt2qw==",
+      "version": "2.5.0",
+      "resolved": "https://registry.npmjs.org/monaco-json/-/monaco-json-2.5.0.tgz",
+      "integrity": "sha512-IBt9x29L6cZ4oBFq+9iIC1uPXe1LIeJ0GigosbeCfPx+jhoucQm+3yMMFprAUIer9b1+lB8q+a6ibEUm8VYktQ==",
       "dev": true
       "dev": true
     },
     },
     "monaco-languages": {
     "monaco-languages": {
-      "version": "1.6.0",
-      "resolved": "https://registry.npmjs.org/monaco-languages/-/monaco-languages-1.6.0.tgz",
-      "integrity": "sha512-LBEWj8tngYwsq4kasQr+dIhnO4xUIEN36ns+cRepWAQiXZnzcrZ84gFHXm8f4mR4tssxvHVU5Vw7xMUYro6h3g==",
+      "version": "1.7.0",
+      "resolved": "https://registry.npmjs.org/monaco-languages/-/monaco-languages-1.7.0.tgz",
+      "integrity": "sha512-2YrYlkCF/g2H0PDt/ERax2IStaihZ17v1JkYnj2xEALYNah0pbQvGH9gXJvdVx0EpBoSRmxVnrwwM2oBWWOjSQ==",
       "dev": true
       "dev": true
     },
     },
     "monaco-typescript": {
     "monaco-typescript": {
-      "version": "3.3.1",
-      "resolved": "https://registry.npmjs.org/monaco-typescript/-/monaco-typescript-3.3.1.tgz",
-      "integrity": "sha512-sOnMeEgDQmwuwkcj/ElVZ7mF3d0HAiCINGWE9LyOH9wJCQNJaBqa+cSP+wnPiSWQnOshHZ+A2vsA8A7PyXls6Q==",
+      "version": "3.4.1",
+      "resolved": "https://registry.npmjs.org/monaco-typescript/-/monaco-typescript-3.4.1.tgz",
+      "integrity": "sha512-pkuKPTvlkE6gmMEF+ZCxgI0ojl8mTsRdMZFDfKfihNiCuOsJCKIYOZ8mnDIhSToUR8rEVq7BUTGO35IwG0PIXw==",
       "dev": true
       "dev": true
     },
     },
     "ms": {
     "ms": {
@@ -3499,7 +3499,7 @@
     },
     },
     "pause-stream": {
     "pause-stream": {
       "version": "0.0.11",
       "version": "0.0.11",
-      "resolved": "https://registry.npmjs.org/pause-stream/-/pause-stream-0.0.11.tgz",
+      "resolved": "http://registry.npmjs.org/pause-stream/-/pause-stream-0.0.11.tgz",
       "integrity": "sha1-/lo0sMvOErWqaitAPuLnO2AvFEU=",
       "integrity": "sha1-/lo0sMvOErWqaitAPuLnO2AvFEU=",
       "dev": true,
       "dev": true,
       "requires": {
       "requires": {
@@ -3579,7 +3579,7 @@
         },
         },
         "kind-of": {
         "kind-of": {
           "version": "1.1.0",
           "version": "1.1.0",
-          "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-1.1.0.tgz",
+          "resolved": "http://registry.npmjs.org/kind-of/-/kind-of-1.1.0.tgz",
           "integrity": "sha1-FAo9LUGjbS78+pN3tiwk+ElaXEQ=",
           "integrity": "sha1-FAo9LUGjbS78+pN3tiwk+ElaXEQ=",
           "dev": true
           "dev": true
         }
         }
@@ -3669,7 +3669,7 @@
     },
     },
     "pretty-hrtime": {
     "pretty-hrtime": {
       "version": "1.0.3",
       "version": "1.0.3",
-      "resolved": "https://registry.npmjs.org/pretty-hrtime/-/pretty-hrtime-1.0.3.tgz",
+      "resolved": "http://registry.npmjs.org/pretty-hrtime/-/pretty-hrtime-1.0.3.tgz",
       "integrity": "sha1-t+PqQkNaTJsnWdmeDyAesZWALuE=",
       "integrity": "sha1-t+PqQkNaTJsnWdmeDyAesZWALuE=",
       "dev": true
       "dev": true
     },
     },
@@ -4245,7 +4245,7 @@
     },
     },
     "split": {
     "split": {
       "version": "0.3.3",
       "version": "0.3.3",
-      "resolved": "https://registry.npmjs.org/split/-/split-0.3.3.tgz",
+      "resolved": "http://registry.npmjs.org/split/-/split-0.3.3.tgz",
       "integrity": "sha1-zQ7qXmOiEd//frDwkcQTPi0N0o8=",
       "integrity": "sha1-zQ7qXmOiEd//frDwkcQTPi0N0o8=",
       "dev": true,
       "dev": true,
       "requires": {
       "requires": {
@@ -4313,7 +4313,7 @@
     },
     },
     "stream-combiner": {
     "stream-combiner": {
       "version": "0.0.4",
       "version": "0.0.4",
-      "resolved": "https://registry.npmjs.org/stream-combiner/-/stream-combiner-0.0.4.tgz",
+      "resolved": "http://registry.npmjs.org/stream-combiner/-/stream-combiner-0.0.4.tgz",
       "integrity": "sha1-TV5DPBhSYd3mI8o/RMWGvPXErRQ=",
       "integrity": "sha1-TV5DPBhSYd3mI8o/RMWGvPXErRQ=",
       "dev": true,
       "dev": true,
       "requires": {
       "requires": {
@@ -4354,7 +4354,7 @@
     },
     },
     "strip-ansi": {
     "strip-ansi": {
       "version": "3.0.1",
       "version": "3.0.1",
-      "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz",
+      "resolved": "http://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz",
       "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=",
       "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=",
       "dev": true,
       "dev": true,
       "requires": {
       "requires": {
@@ -4388,7 +4388,7 @@
     },
     },
     "through": {
     "through": {
       "version": "2.3.8",
       "version": "2.3.8",
-      "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz",
+      "resolved": "http://registry.npmjs.org/through/-/through-2.3.8.tgz",
       "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=",
       "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=",
       "dev": true
       "dev": true
     },
     },

+ 6 - 6
package.json

@@ -23,12 +23,12 @@
     "gulp": "^4.0.0",
     "gulp": "^4.0.0",
     "gulp-typedoc": "^2.2.2",
     "gulp-typedoc": "^2.2.2",
     "http-server": "^0.11.1",
     "http-server": "^0.11.1",
-    "monaco-css": "2.3.0",
-    "monaco-editor-core": "0.15.5",
-    "monaco-html": "2.3.0",
-    "monaco-json": "2.3.0",
-    "monaco-languages": "1.6.0",
-    "monaco-typescript": "3.3.1",
+    "monaco-css": "2.5.0",
+    "monaco-editor-core": "0.16.0",
+    "monaco-html": "2.5.0",
+    "monaco-json": "2.5.0",
+    "monaco-languages": "1.7.0",
+    "monaco-typescript": "3.4.1",
     "rimraf": "^2.6.3",
     "rimraf": "^2.6.3",
     "typedoc": "^0.14.2",
     "typedoc": "^0.14.2",
     "typescript": "^3.3.3",
     "typescript": "^3.3.3",

+ 111 - 73
website/playground/monaco.d.ts.txt

@@ -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 {