From 736ab4b0c444bee771485a862e2b7f5b8cc678b4 Mon Sep 17 00:00:00 2001 From: Alexandru Dima Date: Tue, 14 Jan 2020 16:10:02 +0100 Subject: [PATCH] Check monaco.d.ts in --- monaco.d.ts | 401 ++++++++++++++++++++++++++++- website/playground/monaco.d.ts.txt | 401 ++++++++++++++++++++++++++++- 2 files changed, 800 insertions(+), 2 deletions(-) diff --git a/monaco.d.ts b/monaco.d.ts index 6a17a4ef66..37789bcfcf 100644 --- a/monaco.d.ts +++ b/monaco.d.ts @@ -2477,6 +2477,15 @@ declare namespace monaco.editor { readonly reason: CursorChangeReason; } + export enum AccessibilitySupport { + /** + * This should be the browser case where it is not known if a screen reader is attached or no. + */ + Unknown = 0, + Disabled = 1, + Enabled = 2 + } + /** * Configuration options for auto closing quotes and brackets */ @@ -2492,6 +2501,17 @@ declare namespace monaco.editor { */ export type EditorAutoClosingOvertypeStrategy = 'always' | 'auto' | 'never'; + /** + * Configuration options for auto indentation in the editor + */ + export enum EditorAutoIndentStrategy { + None = 0, + Keep = 1, + Brackets = 2, + Advanced = 3, + Full = 4 + } + /** * Configuration options for the editor. */ @@ -3037,6 +3057,79 @@ declare namespace monaco.editor { export class ConfigurationChangedEvent { } + /** + * All computed editor options. + */ + export interface IComputedEditorOptions { + get(id: T): FindComputedEditorOptionValueById; + } + + export interface IEditorOption { + readonly id: K1; + readonly name: string; + defaultValue: V; + } + + /** + * 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 + } + + /** + * The style in which the editor's cursor should be rendered. + */ + export enum TextEditorCursorStyle { + /** + * As a vertical line (sitting between two characters). + */ + Line = 1, + /** + * As a block (sitting on top of a character). + */ + Block = 2, + /** + * As a horizontal line (sitting under a character). + */ + Underline = 3, + /** + * As a thin vertical line (sitting between two characters). + */ + LineThin = 4, + /** + * As an outlined block (sitting on top of a character). + */ + BlockOutline = 5, + /** + * As a thin horizontal line (sitting under a character). + */ + UnderlineThin = 6 + } + /** * Configuration options for editor find widget */ @@ -3052,6 +3145,8 @@ declare namespace monaco.editor { addExtraSpaceOnTop?: boolean; } + export type EditorFindOptions = Readonly>; + export type GoToLocationValues = 'peek' | 'gotoAndPeek' | 'goto'; /** @@ -3071,6 +3166,8 @@ declare namespace monaco.editor { alternativeReferenceCommand?: string; } + export type GoToLocationOptions = Readonly>; + /** * Configuration options for editor hover */ @@ -3092,6 +3189,8 @@ declare namespace monaco.editor { sticky?: boolean; } + export type EditorHoverOptions = Readonly>; + /** * A description for the overview ruler position. */ @@ -3221,6 +3320,8 @@ declare namespace monaco.editor { enabled?: boolean; } + export type EditorLightbulbOptions = Readonly>; + /** * Configuration options for editor minimap */ @@ -3256,6 +3357,8 @@ declare namespace monaco.editor { scale?: number; } + export type EditorMinimapOptions = Readonly>; + /** * Configuration options for parameter hints */ @@ -3272,6 +3375,8 @@ declare namespace monaco.editor { cycle?: boolean; } + export type InternalParameterHintOptions = Readonly>; + /** * Configuration options for quick suggestions */ @@ -3281,8 +3386,23 @@ declare namespace monaco.editor { strings: boolean; } + export type ValidQuickSuggestionsOptions = boolean | Readonly>; + export type LineNumbersType = 'on' | 'off' | 'relative' | 'interval' | ((lineNumber: number) => string); + export enum RenderLineNumbersType { + Off = 0, + On = 1, + Relative = 2, + Interval = 3, + Custom = 4 + } + + export interface InternalEditorRenderLineNumbersOptions { + readonly renderType: RenderLineNumbersType; + readonly renderFn: ((lineNumber: number) => string) | null; + } + /** * Configuration options for editor scrollbars */ @@ -3349,6 +3469,21 @@ declare namespace monaco.editor { horizontalSliderSize?: number; } + export interface InternalEditorScrollbarOptions { + readonly arrowSize: number; + readonly vertical: ScrollbarVisibility; + readonly horizontal: ScrollbarVisibility; + readonly useShadows: boolean; + readonly verticalHasArrows: boolean; + readonly horizontalHasArrows: boolean; + readonly handleMouseWheel: boolean; + readonly alwaysConsumeMouseWheel: boolean; + readonly horizontalScrollbarSize: number; + readonly horizontalSliderSize: number; + readonly verticalScrollbarSize: number; + readonly verticalSliderSize: number; + } + /** * Configuration options for editor suggest widget */ @@ -3487,6 +3622,262 @@ declare namespace monaco.editor { showSnippets?: boolean; } + export type InternalSuggestOptions = Readonly>; + + /** + * Describes how to indent wrapped lines. + */ + export enum WrappingIndent { + /** + * No indentation => wrapped lines begin at column 1. + */ + None = 0, + /** + * Same => wrapped lines get the same indentation as the parent. + */ + Same = 1, + /** + * Indent => wrapped lines get +1 indentation toward the parent. + */ + Indent = 2, + /** + * DeepIndent => wrapped lines get +2 indentation toward the parent. + */ + DeepIndent = 3 + } + + export interface EditorWrappingInfo { + readonly isDominatedByLongLines: boolean; + readonly isWordWrapMinified: boolean; + readonly isViewportWrapping: boolean; + readonly wrappingColumn: number; + } + + export enum EditorOption { + acceptSuggestionOnCommitCharacter = 0, + acceptSuggestionOnEnter = 1, + accessibilitySupport = 2, + accessibilityPageSize = 3, + ariaLabel = 4, + autoClosingBrackets = 5, + autoClosingOvertype = 6, + autoClosingQuotes = 7, + autoIndent = 8, + automaticLayout = 9, + autoSurround = 10, + codeLens = 11, + colorDecorators = 12, + contextmenu = 13, + copyWithSyntaxHighlighting = 14, + cursorBlinking = 15, + cursorSmoothCaretAnimation = 16, + cursorStyle = 17, + cursorSurroundingLines = 18, + cursorSurroundingLinesStyle = 19, + cursorWidth = 20, + disableLayerHinting = 21, + disableMonospaceOptimizations = 22, + dragAndDrop = 23, + emptySelectionClipboard = 24, + extraEditorClassName = 25, + fastScrollSensitivity = 26, + find = 27, + fixedOverflowWidgets = 28, + folding = 29, + foldingStrategy = 30, + fontFamily = 31, + fontInfo = 32, + fontLigatures = 33, + fontSize = 34, + fontWeight = 35, + formatOnPaste = 36, + formatOnType = 37, + glyphMargin = 38, + gotoLocation = 39, + hideCursorInOverviewRuler = 40, + highlightActiveIndentGuide = 41, + hover = 42, + inDiffEditor = 43, + letterSpacing = 44, + lightbulb = 45, + lineDecorationsWidth = 46, + lineHeight = 47, + lineNumbers = 48, + lineNumbersMinChars = 49, + links = 50, + matchBrackets = 51, + minimap = 52, + mouseStyle = 53, + mouseWheelScrollSensitivity = 54, + mouseWheelZoom = 55, + multiCursorMergeOverlapping = 56, + multiCursorModifier = 57, + multiCursorPaste = 58, + occurrencesHighlight = 59, + overviewRulerBorder = 60, + overviewRulerLanes = 61, + parameterHints = 62, + quickSuggestions = 63, + quickSuggestionsDelay = 64, + readOnly = 65, + renderControlCharacters = 66, + renderIndentGuides = 67, + renderFinalNewline = 68, + renderLineHighlight = 69, + renderWhitespace = 70, + revealHorizontalRightPadding = 71, + roundedSelection = 72, + rulers = 73, + scrollbar = 74, + scrollBeyondLastColumn = 75, + scrollBeyondLastLine = 76, + selectionClipboard = 77, + selectionHighlight = 78, + selectOnLineNumbers = 79, + showFoldingControls = 80, + showUnused = 81, + snippetSuggestions = 82, + smoothScrolling = 83, + stopRenderingLineAfter = 84, + suggest = 85, + suggestFontSize = 86, + suggestLineHeight = 87, + suggestOnTriggerCharacters = 88, + suggestSelection = 89, + tabCompletion = 90, + useTabStops = 91, + wordSeparators = 92, + wordWrap = 93, + wordWrapBreakAfterCharacters = 94, + wordWrapBreakBeforeCharacters = 95, + wordWrapBreakObtrusiveCharacters = 96, + wordWrapColumn = 97, + wordWrapMinified = 98, + wrappingIndent = 99, + editorClassName = 100, + pixelRatio = 101, + tabFocusMode = 102, + layoutInfo = 103, + wrappingInfo = 104 + } + export const EditorOptions: { + acceptSuggestionOnCommitCharacter: IEditorOption; + acceptSuggestionOnEnter: IEditorOption; + accessibilitySupport: IEditorOption; + accessibilityPageSize: IEditorOption; + ariaLabel: IEditorOption; + autoClosingBrackets: IEditorOption; + autoClosingOvertype: IEditorOption; + autoClosingQuotes: IEditorOption; + autoIndent: IEditorOption; + automaticLayout: IEditorOption; + autoSurround: IEditorOption; + codeLens: IEditorOption; + colorDecorators: IEditorOption; + contextmenu: IEditorOption; + copyWithSyntaxHighlighting: IEditorOption; + cursorBlinking: IEditorOption; + cursorSmoothCaretAnimation: IEditorOption; + cursorStyle: IEditorOption; + cursorSurroundingLines: IEditorOption; + cursorSurroundingLinesStyle: IEditorOption; + cursorWidth: IEditorOption; + disableLayerHinting: IEditorOption; + disableMonospaceOptimizations: IEditorOption; + dragAndDrop: IEditorOption; + emptySelectionClipboard: IEditorOption; + extraEditorClassName: IEditorOption; + fastScrollSensitivity: IEditorOption; + find: IEditorOption; + fixedOverflowWidgets: IEditorOption; + folding: IEditorOption; + foldingStrategy: IEditorOption; + fontFamily: IEditorOption; + fontInfo: IEditorOption; + fontLigatures2: IEditorOption; + fontSize: IEditorOption; + fontWeight: IEditorOption; + formatOnPaste: IEditorOption; + formatOnType: IEditorOption; + glyphMargin: IEditorOption; + gotoLocation: IEditorOption; + hideCursorInOverviewRuler: IEditorOption; + highlightActiveIndentGuide: IEditorOption; + hover: IEditorOption; + inDiffEditor: IEditorOption; + letterSpacing: IEditorOption; + lightbulb: IEditorOption; + lineDecorationsWidth: IEditorOption; + lineHeight: IEditorOption; + lineNumbers: IEditorOption; + lineNumbersMinChars: IEditorOption; + links: IEditorOption; + matchBrackets: IEditorOption; + minimap: IEditorOption; + mouseStyle: IEditorOption; + mouseWheelScrollSensitivity: IEditorOption; + mouseWheelZoom: IEditorOption; + multiCursorMergeOverlapping: IEditorOption; + multiCursorModifier: IEditorOption; + multiCursorPaste: IEditorOption; + occurrencesHighlight: IEditorOption; + overviewRulerBorder: IEditorOption; + overviewRulerLanes: IEditorOption; + parameterHints: IEditorOption; + quickSuggestions: IEditorOption; + quickSuggestionsDelay: IEditorOption; + readOnly: IEditorOption; + renderControlCharacters: IEditorOption; + renderIndentGuides: IEditorOption; + renderFinalNewline: IEditorOption; + renderLineHighlight: IEditorOption; + renderWhitespace: IEditorOption; + revealHorizontalRightPadding: IEditorOption; + roundedSelection: IEditorOption; + rulers: IEditorOption; + scrollbar: IEditorOption; + scrollBeyondLastColumn: IEditorOption; + scrollBeyondLastLine: IEditorOption; + selectionClipboard: IEditorOption; + selectionHighlight: IEditorOption; + selectOnLineNumbers: IEditorOption; + showFoldingControls: IEditorOption; + showUnused: IEditorOption; + snippetSuggestions: IEditorOption; + smoothScrolling: IEditorOption; + stopRenderingLineAfter: IEditorOption; + suggest: IEditorOption; + suggestFontSize: IEditorOption; + suggestLineHeight: IEditorOption; + suggestOnTriggerCharacters: IEditorOption; + suggestSelection: IEditorOption; + tabCompletion: IEditorOption; + useTabStops: IEditorOption; + wordSeparators: IEditorOption; + wordWrap: IEditorOption; + wordWrapBreakAfterCharacters: IEditorOption; + wordWrapBreakBeforeCharacters: IEditorOption; + wordWrapBreakObtrusiveCharacters: IEditorOption; + wordWrapColumn: IEditorOption; + wordWrapMinified: IEditorOption; + wrappingIndent: IEditorOption; + editorClassName: IEditorOption; + pixelRatio: IEditorOption; + tabFocusMode: IEditorOption; + layoutInfo: IEditorOption; + wrappingInfo: IEditorOption; + }; + + type EditorOptionsType = typeof EditorOptions; + + type FindEditorOptionsKeyById = { + [K in keyof EditorOptionsType]: EditorOptionsType[K]['id'] extends T ? K : never; + }[keyof EditorOptionsType]; + + type ComputedEditorOptionValue> = T extends IEditorOption ? R : never; + + export type FindComputedEditorOptionValueById = NonNullable]>>; + /** * A view zone is a full horizontal rectangle that 'pushes' text down. * The editor reserves space for view zones when rendering. @@ -3937,6 +4328,14 @@ declare namespace monaco.editor { * It is safe to call setModel(null) to simply detach the current model from the editor. */ setModel(model: ITextModel | null): void; + /** + * Gets all the editor computed options. + */ + getOptions(): IComputedEditorOptions; + /** + * Gets a specific editor option. + */ + getOption(id: T): FindComputedEditorOptionValueById; /** * Returns the editor's configuration (without any validation or defaults). */ @@ -5688,7 +6087,7 @@ declare namespace monaco.worker { } -//dtsv=2 +//dtsv=3 declare namespace monaco.languages.typescript { diff --git a/website/playground/monaco.d.ts.txt b/website/playground/monaco.d.ts.txt index 6a17a4ef66..37789bcfcf 100644 --- a/website/playground/monaco.d.ts.txt +++ b/website/playground/monaco.d.ts.txt @@ -2477,6 +2477,15 @@ declare namespace monaco.editor { readonly reason: CursorChangeReason; } + export enum AccessibilitySupport { + /** + * This should be the browser case where it is not known if a screen reader is attached or no. + */ + Unknown = 0, + Disabled = 1, + Enabled = 2 + } + /** * Configuration options for auto closing quotes and brackets */ @@ -2492,6 +2501,17 @@ declare namespace monaco.editor { */ export type EditorAutoClosingOvertypeStrategy = 'always' | 'auto' | 'never'; + /** + * Configuration options for auto indentation in the editor + */ + export enum EditorAutoIndentStrategy { + None = 0, + Keep = 1, + Brackets = 2, + Advanced = 3, + Full = 4 + } + /** * Configuration options for the editor. */ @@ -3037,6 +3057,79 @@ declare namespace monaco.editor { export class ConfigurationChangedEvent { } + /** + * All computed editor options. + */ + export interface IComputedEditorOptions { + get(id: T): FindComputedEditorOptionValueById; + } + + export interface IEditorOption { + readonly id: K1; + readonly name: string; + defaultValue: V; + } + + /** + * 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 + } + + /** + * The style in which the editor's cursor should be rendered. + */ + export enum TextEditorCursorStyle { + /** + * As a vertical line (sitting between two characters). + */ + Line = 1, + /** + * As a block (sitting on top of a character). + */ + Block = 2, + /** + * As a horizontal line (sitting under a character). + */ + Underline = 3, + /** + * As a thin vertical line (sitting between two characters). + */ + LineThin = 4, + /** + * As an outlined block (sitting on top of a character). + */ + BlockOutline = 5, + /** + * As a thin horizontal line (sitting under a character). + */ + UnderlineThin = 6 + } + /** * Configuration options for editor find widget */ @@ -3052,6 +3145,8 @@ declare namespace monaco.editor { addExtraSpaceOnTop?: boolean; } + export type EditorFindOptions = Readonly>; + export type GoToLocationValues = 'peek' | 'gotoAndPeek' | 'goto'; /** @@ -3071,6 +3166,8 @@ declare namespace monaco.editor { alternativeReferenceCommand?: string; } + export type GoToLocationOptions = Readonly>; + /** * Configuration options for editor hover */ @@ -3092,6 +3189,8 @@ declare namespace monaco.editor { sticky?: boolean; } + export type EditorHoverOptions = Readonly>; + /** * A description for the overview ruler position. */ @@ -3221,6 +3320,8 @@ declare namespace monaco.editor { enabled?: boolean; } + export type EditorLightbulbOptions = Readonly>; + /** * Configuration options for editor minimap */ @@ -3256,6 +3357,8 @@ declare namespace monaco.editor { scale?: number; } + export type EditorMinimapOptions = Readonly>; + /** * Configuration options for parameter hints */ @@ -3272,6 +3375,8 @@ declare namespace monaco.editor { cycle?: boolean; } + export type InternalParameterHintOptions = Readonly>; + /** * Configuration options for quick suggestions */ @@ -3281,8 +3386,23 @@ declare namespace monaco.editor { strings: boolean; } + export type ValidQuickSuggestionsOptions = boolean | Readonly>; + export type LineNumbersType = 'on' | 'off' | 'relative' | 'interval' | ((lineNumber: number) => string); + export enum RenderLineNumbersType { + Off = 0, + On = 1, + Relative = 2, + Interval = 3, + Custom = 4 + } + + export interface InternalEditorRenderLineNumbersOptions { + readonly renderType: RenderLineNumbersType; + readonly renderFn: ((lineNumber: number) => string) | null; + } + /** * Configuration options for editor scrollbars */ @@ -3349,6 +3469,21 @@ declare namespace monaco.editor { horizontalSliderSize?: number; } + export interface InternalEditorScrollbarOptions { + readonly arrowSize: number; + readonly vertical: ScrollbarVisibility; + readonly horizontal: ScrollbarVisibility; + readonly useShadows: boolean; + readonly verticalHasArrows: boolean; + readonly horizontalHasArrows: boolean; + readonly handleMouseWheel: boolean; + readonly alwaysConsumeMouseWheel: boolean; + readonly horizontalScrollbarSize: number; + readonly horizontalSliderSize: number; + readonly verticalScrollbarSize: number; + readonly verticalSliderSize: number; + } + /** * Configuration options for editor suggest widget */ @@ -3487,6 +3622,262 @@ declare namespace monaco.editor { showSnippets?: boolean; } + export type InternalSuggestOptions = Readonly>; + + /** + * Describes how to indent wrapped lines. + */ + export enum WrappingIndent { + /** + * No indentation => wrapped lines begin at column 1. + */ + None = 0, + /** + * Same => wrapped lines get the same indentation as the parent. + */ + Same = 1, + /** + * Indent => wrapped lines get +1 indentation toward the parent. + */ + Indent = 2, + /** + * DeepIndent => wrapped lines get +2 indentation toward the parent. + */ + DeepIndent = 3 + } + + export interface EditorWrappingInfo { + readonly isDominatedByLongLines: boolean; + readonly isWordWrapMinified: boolean; + readonly isViewportWrapping: boolean; + readonly wrappingColumn: number; + } + + export enum EditorOption { + acceptSuggestionOnCommitCharacter = 0, + acceptSuggestionOnEnter = 1, + accessibilitySupport = 2, + accessibilityPageSize = 3, + ariaLabel = 4, + autoClosingBrackets = 5, + autoClosingOvertype = 6, + autoClosingQuotes = 7, + autoIndent = 8, + automaticLayout = 9, + autoSurround = 10, + codeLens = 11, + colorDecorators = 12, + contextmenu = 13, + copyWithSyntaxHighlighting = 14, + cursorBlinking = 15, + cursorSmoothCaretAnimation = 16, + cursorStyle = 17, + cursorSurroundingLines = 18, + cursorSurroundingLinesStyle = 19, + cursorWidth = 20, + disableLayerHinting = 21, + disableMonospaceOptimizations = 22, + dragAndDrop = 23, + emptySelectionClipboard = 24, + extraEditorClassName = 25, + fastScrollSensitivity = 26, + find = 27, + fixedOverflowWidgets = 28, + folding = 29, + foldingStrategy = 30, + fontFamily = 31, + fontInfo = 32, + fontLigatures = 33, + fontSize = 34, + fontWeight = 35, + formatOnPaste = 36, + formatOnType = 37, + glyphMargin = 38, + gotoLocation = 39, + hideCursorInOverviewRuler = 40, + highlightActiveIndentGuide = 41, + hover = 42, + inDiffEditor = 43, + letterSpacing = 44, + lightbulb = 45, + lineDecorationsWidth = 46, + lineHeight = 47, + lineNumbers = 48, + lineNumbersMinChars = 49, + links = 50, + matchBrackets = 51, + minimap = 52, + mouseStyle = 53, + mouseWheelScrollSensitivity = 54, + mouseWheelZoom = 55, + multiCursorMergeOverlapping = 56, + multiCursorModifier = 57, + multiCursorPaste = 58, + occurrencesHighlight = 59, + overviewRulerBorder = 60, + overviewRulerLanes = 61, + parameterHints = 62, + quickSuggestions = 63, + quickSuggestionsDelay = 64, + readOnly = 65, + renderControlCharacters = 66, + renderIndentGuides = 67, + renderFinalNewline = 68, + renderLineHighlight = 69, + renderWhitespace = 70, + revealHorizontalRightPadding = 71, + roundedSelection = 72, + rulers = 73, + scrollbar = 74, + scrollBeyondLastColumn = 75, + scrollBeyondLastLine = 76, + selectionClipboard = 77, + selectionHighlight = 78, + selectOnLineNumbers = 79, + showFoldingControls = 80, + showUnused = 81, + snippetSuggestions = 82, + smoothScrolling = 83, + stopRenderingLineAfter = 84, + suggest = 85, + suggestFontSize = 86, + suggestLineHeight = 87, + suggestOnTriggerCharacters = 88, + suggestSelection = 89, + tabCompletion = 90, + useTabStops = 91, + wordSeparators = 92, + wordWrap = 93, + wordWrapBreakAfterCharacters = 94, + wordWrapBreakBeforeCharacters = 95, + wordWrapBreakObtrusiveCharacters = 96, + wordWrapColumn = 97, + wordWrapMinified = 98, + wrappingIndent = 99, + editorClassName = 100, + pixelRatio = 101, + tabFocusMode = 102, + layoutInfo = 103, + wrappingInfo = 104 + } + export const EditorOptions: { + acceptSuggestionOnCommitCharacter: IEditorOption; + acceptSuggestionOnEnter: IEditorOption; + accessibilitySupport: IEditorOption; + accessibilityPageSize: IEditorOption; + ariaLabel: IEditorOption; + autoClosingBrackets: IEditorOption; + autoClosingOvertype: IEditorOption; + autoClosingQuotes: IEditorOption; + autoIndent: IEditorOption; + automaticLayout: IEditorOption; + autoSurround: IEditorOption; + codeLens: IEditorOption; + colorDecorators: IEditorOption; + contextmenu: IEditorOption; + copyWithSyntaxHighlighting: IEditorOption; + cursorBlinking: IEditorOption; + cursorSmoothCaretAnimation: IEditorOption; + cursorStyle: IEditorOption; + cursorSurroundingLines: IEditorOption; + cursorSurroundingLinesStyle: IEditorOption; + cursorWidth: IEditorOption; + disableLayerHinting: IEditorOption; + disableMonospaceOptimizations: IEditorOption; + dragAndDrop: IEditorOption; + emptySelectionClipboard: IEditorOption; + extraEditorClassName: IEditorOption; + fastScrollSensitivity: IEditorOption; + find: IEditorOption; + fixedOverflowWidgets: IEditorOption; + folding: IEditorOption; + foldingStrategy: IEditorOption; + fontFamily: IEditorOption; + fontInfo: IEditorOption; + fontLigatures2: IEditorOption; + fontSize: IEditorOption; + fontWeight: IEditorOption; + formatOnPaste: IEditorOption; + formatOnType: IEditorOption; + glyphMargin: IEditorOption; + gotoLocation: IEditorOption; + hideCursorInOverviewRuler: IEditorOption; + highlightActiveIndentGuide: IEditorOption; + hover: IEditorOption; + inDiffEditor: IEditorOption; + letterSpacing: IEditorOption; + lightbulb: IEditorOption; + lineDecorationsWidth: IEditorOption; + lineHeight: IEditorOption; + lineNumbers: IEditorOption; + lineNumbersMinChars: IEditorOption; + links: IEditorOption; + matchBrackets: IEditorOption; + minimap: IEditorOption; + mouseStyle: IEditorOption; + mouseWheelScrollSensitivity: IEditorOption; + mouseWheelZoom: IEditorOption; + multiCursorMergeOverlapping: IEditorOption; + multiCursorModifier: IEditorOption; + multiCursorPaste: IEditorOption; + occurrencesHighlight: IEditorOption; + overviewRulerBorder: IEditorOption; + overviewRulerLanes: IEditorOption; + parameterHints: IEditorOption; + quickSuggestions: IEditorOption; + quickSuggestionsDelay: IEditorOption; + readOnly: IEditorOption; + renderControlCharacters: IEditorOption; + renderIndentGuides: IEditorOption; + renderFinalNewline: IEditorOption; + renderLineHighlight: IEditorOption; + renderWhitespace: IEditorOption; + revealHorizontalRightPadding: IEditorOption; + roundedSelection: IEditorOption; + rulers: IEditorOption; + scrollbar: IEditorOption; + scrollBeyondLastColumn: IEditorOption; + scrollBeyondLastLine: IEditorOption; + selectionClipboard: IEditorOption; + selectionHighlight: IEditorOption; + selectOnLineNumbers: IEditorOption; + showFoldingControls: IEditorOption; + showUnused: IEditorOption; + snippetSuggestions: IEditorOption; + smoothScrolling: IEditorOption; + stopRenderingLineAfter: IEditorOption; + suggest: IEditorOption; + suggestFontSize: IEditorOption; + suggestLineHeight: IEditorOption; + suggestOnTriggerCharacters: IEditorOption; + suggestSelection: IEditorOption; + tabCompletion: IEditorOption; + useTabStops: IEditorOption; + wordSeparators: IEditorOption; + wordWrap: IEditorOption; + wordWrapBreakAfterCharacters: IEditorOption; + wordWrapBreakBeforeCharacters: IEditorOption; + wordWrapBreakObtrusiveCharacters: IEditorOption; + wordWrapColumn: IEditorOption; + wordWrapMinified: IEditorOption; + wrappingIndent: IEditorOption; + editorClassName: IEditorOption; + pixelRatio: IEditorOption; + tabFocusMode: IEditorOption; + layoutInfo: IEditorOption; + wrappingInfo: IEditorOption; + }; + + type EditorOptionsType = typeof EditorOptions; + + type FindEditorOptionsKeyById = { + [K in keyof EditorOptionsType]: EditorOptionsType[K]['id'] extends T ? K : never; + }[keyof EditorOptionsType]; + + type ComputedEditorOptionValue> = T extends IEditorOption ? R : never; + + export type FindComputedEditorOptionValueById = NonNullable]>>; + /** * A view zone is a full horizontal rectangle that 'pushes' text down. * The editor reserves space for view zones when rendering. @@ -3937,6 +4328,14 @@ declare namespace monaco.editor { * It is safe to call setModel(null) to simply detach the current model from the editor. */ setModel(model: ITextModel | null): void; + /** + * Gets all the editor computed options. + */ + getOptions(): IComputedEditorOptions; + /** + * Gets a specific editor option. + */ + getOption(id: T): FindComputedEditorOptionValueById; /** * Returns the editor's configuration (without any validation or defaults). */ @@ -5688,7 +6087,7 @@ declare namespace monaco.worker { } -//dtsv=2 +//dtsv=3 declare namespace monaco.languages.typescript {