Skip to content

Commit

Permalink
Remove unused types from monaco.d.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
alexdima committed Dec 12, 2019
1 parent 19587ff commit dfd849b
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 247 deletions.
1 change: 0 additions & 1 deletion build/monaco/monaco.d.ts.recipe
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ export interface ICommandHandler {
#includeAll(vs/editor/common/editorCommon;editorOptions.=>): IScrollEvent
#includeAll(vs/editor/common/model/textModelEvents):
#includeAll(vs/editor/common/controller/cursorEvents):
#include(vs/platform/accessibility/common/accessibility): AccessibilitySupport
#includeAll(vs/editor/common/config/editorOptions):
#includeAll(vs/editor/browser/editorBrowser;editorCommon.=>;editorOptions.=>):
#include(vs/editor/common/config/fontInfo): FontInfo, BareFontInfo
Expand Down
39 changes: 39 additions & 0 deletions src/vs/editor/common/config/editorOptions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -990,6 +990,7 @@ class EditorAccessibilitySupport extends BaseEditorOption<EditorOption.accessibi

/**
* The kind of animation in which the editor's cursor should be rendered.
* @internal
*/
export const enum TextEditorCursorBlinkingStyle {
/**
Expand Down Expand Up @@ -1034,6 +1035,7 @@ function _cursorBlinkingStyleFromString(cursorBlinkingStyle: 'blink' | 'smooth'

/**
* The style in which the editor's cursor should be rendered.
* @internal
*/
export enum TextEditorCursorStyle {
/**
Expand Down Expand Up @@ -1159,6 +1161,9 @@ export interface IEditorFindOptions {
globalFindClipboard?: boolean;
}

/**
* @internal
*/
export type EditorFindOptions = Readonly<Required<IEditorFindOptions>>;

class EditorFind extends BaseEditorOption<EditorOption.find, EditorFindOptions> {
Expand Down Expand Up @@ -1346,6 +1351,9 @@ export interface IGotoLocationOptions {
alternativeReferenceCommand?: string;
}

/**
* @internal
*/
export type GoToLocationOptions = Readonly<Required<IGotoLocationOptions>>;

class EditorGoToLocation extends BaseEditorOption<EditorOption.gotoLocation, GoToLocationOptions> {
Expand Down Expand Up @@ -1475,6 +1483,9 @@ export interface IEditorHoverOptions {
sticky?: boolean;
}

/**
* @internal
*/
export type EditorHoverOptions = Readonly<Required<IEditorHoverOptions>>;

class EditorHover extends BaseEditorOption<EditorOption.hover, EditorHoverOptions> {
Expand Down Expand Up @@ -1851,6 +1862,9 @@ export interface IEditorLightbulbOptions {
enabled?: boolean;
}

/**
* @internal
*/
export type EditorLightbulbOptions = Readonly<Required<IEditorLightbulbOptions>>;

class EditorLightbulb extends BaseEditorOption<EditorOption.lightbulb, EditorLightbulbOptions> {
Expand Down Expand Up @@ -1942,6 +1956,9 @@ export interface IEditorMinimapOptions {
scale?: number;
}

/**
* @internal
*/
export type EditorMinimapOptions = Readonly<Required<IEditorMinimapOptions>>;

class EditorMinimap extends BaseEditorOption<EditorOption.minimap, EditorMinimapOptions> {
Expand Down Expand Up @@ -2043,6 +2060,9 @@ export interface IEditorParameterHintOptions {
cycle?: boolean;
}

/**
* @internal
*/
export type InternalParameterHintOptions = Readonly<Required<IEditorParameterHintOptions>>;

class EditorParameterHints extends BaseEditorOption<EditorOption.parameterHints, InternalParameterHintOptions> {
Expand Down Expand Up @@ -2109,6 +2129,9 @@ export interface IQuickSuggestionsOptions {
strings: boolean;
}

/**
* @internal
*/
export type ValidQuickSuggestionsOptions = boolean | Readonly<Required<IQuickSuggestionsOptions>>;

class EditorQuickSuggestions extends BaseEditorOption<EditorOption.quickSuggestions, ValidQuickSuggestionsOptions> {
Expand Down Expand Up @@ -2185,6 +2208,9 @@ class EditorQuickSuggestions extends BaseEditorOption<EditorOption.quickSuggesti

export type LineNumbersType = 'on' | 'off' | 'relative' | 'interval' | ((lineNumber: number) => string);

/**
* @internal
*/
export const enum RenderLineNumbersType {
Off = 0,
On = 1,
Expand All @@ -2193,6 +2219,9 @@ export const enum RenderLineNumbersType {
Custom = 4
}

/**
* @internal
*/
export interface InternalEditorRenderLineNumbersOptions {
readonly renderType: RenderLineNumbersType;
readonly renderFn: ((lineNumber: number) => string) | null;
Expand Down Expand Up @@ -2348,6 +2377,9 @@ export interface IEditorScrollbarOptions {
horizontalSliderSize?: number;
}

/**
* @internal
*/
export interface InternalEditorScrollbarOptions {
readonly arrowSize: number;
readonly vertical: ScrollbarVisibility;
Expand Down Expand Up @@ -2562,6 +2594,9 @@ export interface ISuggestOptions {
showSnippets?: boolean;
}

/**
* @internal
*/
export type InternalSuggestOptions = Readonly<Required<ISuggestOptions>>;

class EditorSuggest extends BaseEditorOption<EditorOption.suggest, InternalSuggestOptions> {
Expand Down Expand Up @@ -2855,6 +2890,7 @@ class EditorTabFocusMode extends ComputedEditorOption<EditorOption.tabFocusMode,

/**
* Describes how to indent wrapped lines.
* @internal
*/
export const enum WrappingIndent {
/**
Expand Down Expand Up @@ -2888,6 +2924,9 @@ function _wrappingIndentFromString(wrappingIndent: 'none' | 'same' | 'indent' |

//#region wrappingInfo

/**
* @internal
*/
export interface EditorWrappingInfo {
readonly isDominatedByLongLines: boolean;
readonly isWordWrapMinified: boolean;
Expand Down
99 changes: 0 additions & 99 deletions src/vs/editor/common/standalone/standaloneEnums.ts
Original file line number Diff line number Diff line change
Expand Up @@ -333,111 +333,12 @@ export enum CursorChangeReason {
Redo = 6
}

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
}

/**
* 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
}

export enum RenderMinimap {
None = 0,
Text = 1,
Blocks = 2
}

export enum RenderLineNumbersType {
Off = 0,
On = 1,
Relative = 2,
Interval = 3,
Custom = 4
}

/**
* 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
}

/**
* A positioning preference for rendering content widgets.
*/
Expand Down
5 changes: 0 additions & 5 deletions src/vs/editor/standalone/browser/standaloneEditor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -346,9 +346,7 @@ export function createMonacoEditorAPI(): typeof monaco.editor {
remeasureFonts: remeasureFonts,

// enums
AccessibilitySupport: standaloneEnums.AccessibilitySupport,
ScrollbarVisibility: standaloneEnums.ScrollbarVisibility,
WrappingIndent: standaloneEnums.WrappingIndent,
OverviewRulerLane: standaloneEnums.OverviewRulerLane,
MinimapPosition: standaloneEnums.MinimapPosition,
EndOfLinePreference: standaloneEnums.EndOfLinePreference,
Expand All @@ -357,13 +355,10 @@ export function createMonacoEditorAPI(): typeof monaco.editor {
TrackedRangeStickiness: standaloneEnums.TrackedRangeStickiness,
CursorChangeReason: standaloneEnums.CursorChangeReason,
MouseTargetType: standaloneEnums.MouseTargetType,
TextEditorCursorStyle: standaloneEnums.TextEditorCursorStyle,
TextEditorCursorBlinkingStyle: standaloneEnums.TextEditorCursorBlinkingStyle,
ContentWidgetPositionPreference: standaloneEnums.ContentWidgetPositionPreference,
OverlayWidgetPositionPreference: standaloneEnums.OverlayWidgetPositionPreference,
RenderMinimap: standaloneEnums.RenderMinimap,
ScrollType: standaloneEnums.ScrollType,
RenderLineNumbersType: standaloneEnums.RenderLineNumbersType,

// classes
ConfigurationChangedEvent: <any>ConfigurationChangedEvent,
Expand Down
Loading

0 comments on commit dfd849b

Please sign in to comment.