update d.ts version.

pull/1450/head
Peng Lyu 6 years ago
parent fd2ab300e9
commit b1993078c4

2
monaco.d.ts vendored

@ -1,6 +1,6 @@
/*!----------------------------------------------------------- /*!-----------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved. * Copyright (c) Microsoft Corporation. All rights reserved.
* Type definitions for monaco-editor v0.16.2 * Type definitions for monaco-editor v0.17.0
* Released under the MIT license * Released under the MIT license
*-----------------------------------------------------------*/ *-----------------------------------------------------------*/
/*--------------------------------------------------------------------------------------------- /*---------------------------------------------------------------------------------------------

@ -1,6 +1,6 @@
/*!----------------------------------------------------------- /*!-----------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved. * Copyright (c) Microsoft Corporation. All rights reserved.
* Type definitions for monaco-editor v0.16.2 * Type definitions for monaco-editor v0.17.0
* Released under the MIT license * Released under the MIT license
*-----------------------------------------------------------*/ *-----------------------------------------------------------*/
/*--------------------------------------------------------------------------------------------- /*---------------------------------------------------------------------------------------------
@ -43,6 +43,7 @@ declare namespace monaco {
} }
export class CancellationTokenSource { export class CancellationTokenSource {
constructor(parent?: CancellationToken);
readonly token: CancellationToken; readonly token: CancellationToken;
cancel(): void; cancel(): void;
dispose(): void; dispose(): void;
@ -175,8 +176,11 @@ declare namespace monaco {
* @param skipEncoding Do not encode the result, default is `false` * @param skipEncoding Do not encode the result, default is `false`
*/ */
toString(skipEncoding?: boolean): string; toString(skipEncoding?: boolean): string;
toJSON(): object; toJSON(): UriComponents;
static revive(data: UriComponents | any): Uri; static revive(data: UriComponents | Uri): Uri;
static revive(data: UriComponents | Uri | undefined): Uri | undefined;
static revive(data: UriComponents | Uri | null): Uri | null;
static revive(data: UriComponents | Uri | undefined | null): Uri | undefined | null;
} }
export interface UriComponents { export interface UriComponents {
@ -1392,7 +1396,7 @@ declare namespace monaco.editor {
/** /**
* The text to replace with. This can be null to emulate a simple delete. * The text to replace with. This can be null to emulate a simple delete.
*/ */
text: string; text: string | null;
/** /**
* This indicates that this operation has "insert" semantics. * This indicates that this operation has "insert" semantics.
* i.e. forceMoveMarkers = true => if `range` is collapsed, all markers at the position will be moved. * i.e. forceMoveMarkers = true => if `range` is collapsed, all markers at the position will be moved.
@ -2552,6 +2556,25 @@ declare namespace monaco.editor {
* Enable using global storage for remembering suggestions. * Enable using global storage for remembering suggestions.
*/ */
shareSuggestSelections?: boolean; shareSuggestSelections?: boolean;
/**
* Enable or disable icons in suggestions. Defaults to true.
*/
showIcons?: boolean;
/**
* Max suggestions to show in suggestions. Defaults to 12.
*/
maxVisibleSuggestions?: boolean;
/**
* Names of suggestion types to filter.
*/
filteredTypes?: Record<string, boolean>;
}
export interface IGotoLocationOptions {
/**
* Control how goto-command work when having multiple results.
*/
multiple?: 'peek' | 'gotoAndPeek' | 'goto';
} }
/** /**
@ -2594,7 +2617,7 @@ declare namespace monaco.editor {
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. * Render last line number when the file ends with a newline.
* Defaults to true on Windows/Mac and to false on Linux. * Defaults to true.
*/ */
renderFinalNewline?: boolean; renderFinalNewline?: boolean;
/** /**
@ -2828,6 +2851,10 @@ declare namespace monaco.editor {
* Suggest options. * Suggest options.
*/ */
suggest?: ISuggestOptions; suggest?: ISuggestOptions;
/**
*
*/
gotoLocation?: IGotoLocationOptions;
/** /**
* Enable quick suggestions (shadow suggestions) * Enable quick suggestions (shadow suggestions)
* Defaults to true. * Defaults to true.
@ -2846,11 +2873,6 @@ declare namespace monaco.editor {
* Parameter hint options. * Parameter hint options.
*/ */
parameterHints?: IEditorParameterHintOptions; parameterHints?: IEditorParameterHintOptions;
/**
* Render icons in suggestions box.
* Defaults to true.
*/
iconsInSuggestions?: boolean;
/** /**
* Options for auto closing brackets. * Options for auto closing brackets.
* Defaults to language defined behavior. * Defaults to language defined behavior.
@ -3194,12 +3216,19 @@ declare namespace monaco.editor {
readonly sticky: boolean; readonly sticky: boolean;
} }
export interface InternalGoToLocationOptions {
readonly multiple: 'peek' | 'gotoAndPeek' | 'goto';
}
export interface InternalSuggestOptions { export interface InternalSuggestOptions {
readonly filterGraceful: boolean; readonly filterGraceful: boolean;
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; readonly shareSuggestSelections: boolean;
readonly showIcons: boolean;
readonly maxVisibleSuggestions: number;
readonly filteredTypes: Record<string, boolean>;
} }
export interface InternalParameterHintOptions { export interface InternalParameterHintOptions {
@ -3274,7 +3303,6 @@ declare namespace monaco.editor {
}; };
readonly quickSuggestionsDelay: number; readonly quickSuggestionsDelay: number;
readonly parameterHints: InternalParameterHintOptions; readonly parameterHints: InternalParameterHintOptions;
readonly iconsInSuggestions: boolean;
readonly formatOnType: boolean; readonly formatOnType: boolean;
readonly formatOnPaste: boolean; readonly formatOnPaste: boolean;
readonly suggestOnTriggerCharacters: boolean; readonly suggestOnTriggerCharacters: boolean;
@ -3286,6 +3314,7 @@ declare namespace monaco.editor {
readonly suggestLineHeight: number; readonly suggestLineHeight: number;
readonly tabCompletion: 'on' | 'off' | 'onlySnippets'; readonly tabCompletion: 'on' | 'off' | 'onlySnippets';
readonly suggest: InternalSuggestOptions; readonly suggest: InternalSuggestOptions;
readonly gotoLocation: InternalGoToLocationOptions;
readonly selectionHighlight: boolean; readonly selectionHighlight: boolean;
readonly occurrencesHighlight: boolean; readonly occurrencesHighlight: boolean;
readonly codeLens: boolean; readonly codeLens: boolean;
@ -4572,7 +4601,7 @@ declare namespace monaco.languages {
/** /**
* The string that appears on the last line and closes the doc comment (e.g. ' * /'). * The string that appears on the last line and closes the doc comment (e.g. ' * /').
*/ */
close: string; close?: string;
} }
/** /**
@ -5185,6 +5214,7 @@ declare namespace monaco.languages {
* the formatting-feature. * the formatting-feature.
*/ */
export interface DocumentFormattingEditProvider { export interface DocumentFormattingEditProvider {
readonly displayName?: string;
/** /**
* Provide formatting edits for a whole document. * Provide formatting edits for a whole document.
*/ */
@ -5196,6 +5226,7 @@ declare namespace monaco.languages {
* the formatting-feature. * the formatting-feature.
*/ */
export interface DocumentRangeFormattingEditProvider { export interface DocumentRangeFormattingEditProvider {
readonly displayName?: string;
/** /**
* Provide formatting edits for a range in a document. * Provide formatting edits for a range in a document.
* *
@ -5230,11 +5261,16 @@ declare namespace monaco.languages {
url?: Uri | string; url?: Uri | string;
} }
export interface ILinksList {
links: ILink[];
dispose?(): void;
}
/** /**
* A provider of links. * A provider of links.
*/ */
export interface LinkProvider { export interface LinkProvider {
provideLinks(model: editor.ITextModel, token: CancellationToken): ProviderResult<ILink[]>; provideLinks(model: editor.ITextModel, token: CancellationToken): ProviderResult<ILinksList>;
resolveLink?: (link: ILink, token: CancellationToken) => ProviderResult<ILink>; resolveLink?: (link: ILink, token: CancellationToken) => ProviderResult<ILink>;
} }

Loading…
Cancel
Save