提交 64b2a7b0 编写于 作者: M Matt Bierner

Reorder enum values in editor options

With TS 4.1, the emit order of the string literal types here seems to have changed. Try reordering this
上级 b160164e
...@@ -96,7 +96,7 @@ export interface IEditorOptions { ...@@ -96,7 +96,7 @@ export interface IEditorOptions {
* Remove unusual line terminators like LINE SEPARATOR (LS), PARAGRAPH SEPARATOR (PS). * Remove unusual line terminators like LINE SEPARATOR (LS), PARAGRAPH SEPARATOR (PS).
* Defaults to 'prompt'. * Defaults to 'prompt'.
*/ */
unusualLineTerminators?: 'off' | 'prompt' | 'auto'; unusualLineTerminators?: 'auto' | 'off' | 'prompt';
/** /**
* 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.
...@@ -4217,8 +4217,8 @@ export const EditorOptions = { ...@@ -4217,8 +4217,8 @@ export const EditorOptions = {
)), )),
unusualLineTerminators: register(new EditorStringEnumOption( unusualLineTerminators: register(new EditorStringEnumOption(
EditorOption.unusualLineTerminators, 'unusualLineTerminators', EditorOption.unusualLineTerminators, 'unusualLineTerminators',
'prompt' as 'off' | 'prompt' | 'auto', 'prompt' as 'auto' | 'off' | 'prompt',
['off', 'prompt', 'auto'] as const, ['auto', 'off', 'prompt'] as const,
{ {
enumDescriptions: [ enumDescriptions: [
nls.localize('unusualLineTerminators.off', "Unusual line terminators are ignored."), nls.localize('unusualLineTerminators.off', "Unusual line terminators are ignored."),
......
...@@ -27,7 +27,7 @@ class UnusualLineTerminatorsDetector extends Disposable implements IEditorContri ...@@ -27,7 +27,7 @@ class UnusualLineTerminatorsDetector extends Disposable implements IEditorContri
public static readonly ID = 'editor.contrib.unusualLineTerminatorsDetector'; public static readonly ID = 'editor.contrib.unusualLineTerminatorsDetector';
private _config: 'off' | 'prompt' | 'auto'; private _config: 'auto' | 'off' | 'prompt';
constructor( constructor(
private readonly _editor: ICodeEditor, private readonly _editor: ICodeEditor,
......
...@@ -2635,7 +2635,7 @@ declare namespace monaco.editor { ...@@ -2635,7 +2635,7 @@ declare namespace monaco.editor {
* Remove unusual line terminators like LINE SEPARATOR (LS), PARAGRAPH SEPARATOR (PS). * Remove unusual line terminators like LINE SEPARATOR (LS), PARAGRAPH SEPARATOR (PS).
* Defaults to 'prompt'. * Defaults to 'prompt'.
*/ */
unusualLineTerminators?: 'off' | 'prompt' | 'auto'; unusualLineTerminators?: 'auto' | 'off' | 'prompt';
/** /**
* 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.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册