Skip to content

Commit 6663fcd

Browse files
committed
Mark public static fields readonly
1 parent 2debd8b commit 6663fcd

76 files changed

Lines changed: 486 additions & 486 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

src/vs/base/browser/browser.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import { IDisposable } from 'vs/base/common/lifecycle';
1010

1111
class WindowManager {
1212

13-
public static INSTANCE = new WindowManager();
13+
public static readonly INSTANCE = new WindowManager();
1414

1515
// --- Zoom Level
1616
private _zoomLevel: number = 0;

src/vs/base/browser/ui/actionbar/actionbar.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ export class BaseActionItem implements IActionItem {
214214

215215
export class Separator extends Action {
216216

217-
public static ID = 'vs.actions.separator';
217+
public static readonly ID = 'vs.actions.separator';
218218

219219
constructor(label?: string, order?: number) {
220220
super(Separator.ID, label, label ? 'separator text' : 'separator');

src/vs/base/browser/ui/scrollbar/scrollableElement.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ class MouseWheelClassifierItem {
4545

4646
export class MouseWheelClassifier {
4747

48-
public static INSTANCE = new MouseWheelClassifier();
48+
public static readonly INSTANCE = new MouseWheelClassifier();
4949

5050
private readonly _capacity: number;
5151
private _memory: MouseWheelClassifierItem[];

src/vs/base/browser/ui/toolbar/toolbar.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ export class ToolBar {
157157

158158
class ToggleMenuAction extends Action {
159159

160-
public static ID = 'toolbar.toggle.more';
160+
public static readonly ID = 'toolbar.toggle.more';
161161

162162
private _menuActions: IAction[];
163163
private toggleDropdownMenu: () => void;

src/vs/code/electron-main/window.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,8 @@ interface ITouchBarSegment extends Electron.SegmentedControlSegment {
7272

7373
export class CodeWindow implements ICodeWindow {
7474

75-
public static themeStorageKey = 'theme';
76-
public static themeBackgroundStorageKey = 'themeBackground';
75+
public static readonly themeStorageKey = 'theme';
76+
public static readonly themeBackgroundStorageKey = 'themeBackground';
7777

7878
private static DEFAULT_BG_LIGHT = '#FFFFFF';
7979
private static DEFAULT_BG_DARK = '#1E1E1E';

src/vs/editor/browser/config/configuration.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ export interface ISerializedFontInfo {
9696

9797
class CSSBasedConfiguration extends Disposable {
9898

99-
public static INSTANCE = new CSSBasedConfiguration();
99+
public static readonly INSTANCE = new CSSBasedConfiguration();
100100

101101
private _cache: CSSBasedConfigurationCache;
102102
private _evictUntrustedReadingsTimeout: number;

src/vs/editor/browser/controller/textAreaState.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ export interface ITypeData {
3131

3232
export class TextAreaState {
3333

34-
public static EMPTY = new TextAreaState('', 0, 0, null, null);
34+
public static readonly EMPTY = new TextAreaState('', 0, 0, null, null);
3535

3636
public readonly value: string;
3737
public readonly selectionStart: number;

src/vs/editor/browser/editorExtensions.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ const Extensions = {
283283

284284
class EditorContributionRegistry {
285285

286-
public static INSTANCE = new EditorContributionRegistry();
286+
public static readonly INSTANCE = new EditorContributionRegistry();
287287

288288
private editorContributions: IEditorContributionCtor[];
289289
private editorActions: EditorAction[];

src/vs/editor/browser/viewParts/lineNumbers/lineNumbers.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import { RenderLineNumbersType } from 'vs/editor/common/config/editorOptions';
1818

1919
export class LineNumbersOverlay extends DynamicViewOverlay {
2020

21-
public static CLASS_NAME = 'line-numbers';
21+
public static readonly CLASS_NAME = 'line-numbers';
2222

2323
private _context: ViewContext;
2424

src/vs/editor/browser/viewParts/lines/viewLine.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ export class ViewLineOptions {
108108

109109
export class ViewLine implements IVisibleLine {
110110

111-
public static CLASS_NAME = 'view-line';
111+
public static readonly CLASS_NAME = 'view-line';
112112

113113
private _options: ViewLineOptions;
114114
private _isMaybeInvalid: boolean;

0 commit comments

Comments
 (0)