Skip to content

Commit 09ac3c5

Browse files
author
Matt Bierner
committed
Marking some more editor interface fields readonly
1 parent b7b1088 commit 09ac3c5

2 files changed

Lines changed: 10 additions & 10 deletions

File tree

src/vs/editor/common/services/resolverService.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ export interface ITextEditorModel extends IEditorModel {
3939
/**
4040
* Provides access to the underlying `ITextModel`.
4141
*/
42-
textEditorModel: ITextModel;
42+
readonly textEditorModel: ITextModel;
4343

4444
isReadonly(): boolean;
4545
}

src/vs/platform/editor/common/editor.ts

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ export interface IEditorModel {
1111
/**
1212
* Emitted when the model is disposed.
1313
*/
14-
onDispose: Event<void>;
14+
readonly onDispose: Event<void>;
1515

1616
/**
1717
* Loads the model.
@@ -34,12 +34,12 @@ export interface IBaseResourceInput {
3434
/**
3535
* Label to show for the diff editor
3636
*/
37-
label?: string;
37+
readonly label?: string;
3838

3939
/**
4040
* Description to show for the diff editor
4141
*/
42-
description?: string;
42+
readonly description?: string;
4343

4444
/**
4545
* Hint to indicate that this input should be treated as a file
@@ -48,7 +48,7 @@ export interface IBaseResourceInput {
4848
* Without this hint, the editor service will make a guess by
4949
* looking at the scheme of the resource(s).
5050
*/
51-
forceFile?: boolean;
51+
readonly forceFile?: boolean;
5252
}
5353

5454
export interface IResourceInput extends IBaseResourceInput {
@@ -61,7 +61,7 @@ export interface IResourceInput extends IBaseResourceInput {
6161
/**
6262
* The encoding of the text input if known.
6363
*/
64-
encoding?: string;
64+
readonly encoding?: string;
6565
}
6666

6767
export interface IEditorOptions {
@@ -112,10 +112,10 @@ export interface IEditorOptions {
112112
}
113113

114114
export interface ITextEditorSelection {
115-
startLineNumber: number;
116-
startColumn: number;
117-
endLineNumber?: number;
118-
endColumn?: number;
115+
readonly startLineNumber: number;
116+
readonly startColumn: number;
117+
readonly endLineNumber?: number;
118+
readonly endColumn?: number;
119119
}
120120

121121
export interface ITextEditorOptions extends IEditorOptions {

0 commit comments

Comments
 (0)