@@ -73,52 +73,52 @@ export type Environment = EnvironmentId & {
73
73
/**
74
74
* Carries details about python executable.
75
75
*/
76
- executable : {
76
+ readonly executable : {
77
77
/**
78
78
* Uri of the python interpreter/executable. Carries `undefined` in case an executable does not belong to
79
79
* the environment.
80
80
*/
81
- uri : Uri | undefined ;
81
+ readonly uri : Uri | undefined ;
82
82
/**
83
83
* Bitness if known at this moment.
84
84
*/
85
- bitness : Architecture | undefined ;
85
+ readonly bitness : Architecture | undefined ;
86
86
/**
87
87
* Value of `sys.prefix` in sys module if known at this moment.
88
88
*/
89
- sysPrefix : string | undefined ;
89
+ readonly sysPrefix : string | undefined ;
90
90
} ;
91
91
/**
92
92
* Carries details if it is an environment, otherwise `undefined` in case of global interpreters and others.
93
93
*/
94
- environment :
94
+ readonly environment :
95
95
| {
96
96
/**
97
97
* Type of the environment.
98
98
*/
99
- type : EnvironmentType ;
99
+ readonly type : EnvironmentType ;
100
100
/**
101
101
* Name to the environment if any.
102
102
*/
103
- name : string | undefined ;
103
+ readonly name : string | undefined ;
104
104
/**
105
105
* Uri of the environment folder.
106
106
*/
107
- folderUri : Uri ;
107
+ readonly folderUri : Uri ;
108
108
/**
109
109
* Any specific workspace folder this environment is created for.
110
110
*/
111
- workspaceFolder : Uri | undefined ;
111
+ readonly workspaceFolder : Uri | undefined ;
112
112
}
113
113
| undefined ;
114
114
/**
115
115
* Carries Python version information known at this moment.
116
116
*/
117
- version : VersionInfo & {
117
+ readonly version : VersionInfo & {
118
118
/**
119
119
* Value of `sys.version` in sys module if known at this moment.
120
120
*/
121
- sysVersion : string | undefined ;
121
+ readonly sysVersion : string | undefined ;
122
122
} ;
123
123
/**
124
124
* Tools/plugins which created the environment or where it came from. First value in array corresponds
@@ -127,7 +127,7 @@ export type Environment = EnvironmentId & {
127
127
* Array is empty if no tool is responsible for creating/managing the environment. Usually the case for
128
128
* global interpreters.
129
129
*/
130
- tools : EnvironmentTools [ ] ;
130
+ readonly tools : readonly EnvironmentTools [ ] ;
131
131
} ;
132
132
133
133
/**
@@ -138,47 +138,47 @@ export type ResolvedEnvironment = Environment & {
138
138
/**
139
139
* Carries complete details about python executable.
140
140
*/
141
- executable : {
141
+ readonly executable : {
142
142
/**
143
143
* Uri of the python interpreter/executable. Carries `undefined` in case an executable does not belong to
144
144
* the environment.
145
145
*/
146
- uri : Uri | undefined ;
146
+ readonly uri : Uri | undefined ;
147
147
/**
148
148
* Bitness of the environment.
149
149
*/
150
- bitness : Architecture ;
150
+ readonly bitness : Architecture ;
151
151
/**
152
152
* Value of `sys.prefix` in sys module.
153
153
*/
154
- sysPrefix : string ;
154
+ readonly sysPrefix : string ;
155
155
} ;
156
156
/**
157
157
* Carries complete Python version information.
158
158
*/
159
- version : ResolvedVersionInfo & {
159
+ readonly version : ResolvedVersionInfo & {
160
160
/**
161
161
* Value of `sys.version` in sys module if known at this moment.
162
162
*/
163
- sysVersion : string ;
163
+ readonly sysVersion : string ;
164
164
} ;
165
165
} ;
166
166
167
167
export type EnvironmentsChangeEvent = {
168
- env : Environment ;
168
+ readonly env : Environment ;
169
169
/**
170
170
* * "add": New environment is added.
171
171
* * "remove": Existing environment in the list is removed.
172
172
* * "update": New information found about existing environment.
173
173
*/
174
- type : 'add' | 'remove' | 'update' ;
174
+ readonly type : 'add' | 'remove' | 'update' ;
175
175
} ;
176
176
177
177
export type ActiveEnvironmentIdChangeEvent = EnvironmentId & {
178
178
/**
179
179
* Workspace folder the environment changed for.
180
180
*/
181
- resource : WorkspaceFolder | undefined ;
181
+ readonly resource : WorkspaceFolder | undefined ;
182
182
} ;
183
183
184
184
/**
@@ -190,13 +190,13 @@ export type EnvironmentId = {
190
190
/**
191
191
* The ID of the environment.
192
192
*/
193
- id : string ;
193
+ readonly id : string ;
194
194
/**
195
195
* Path to environment folder or path to python executable that uniquely identifies an environment. Environments
196
196
* lacking a python executable are identified by environment folder paths, whereas other envs can be identified
197
197
* using python executable path.
198
198
*/
199
- path : string ;
199
+ readonly path : string ;
200
200
} ;
201
201
202
202
/**
@@ -240,20 +240,20 @@ export type PythonReleaseLevel = 'alpha' | 'beta' | 'candidate' | 'final';
240
240
* Release information for a Python version.
241
241
*/
242
242
export type PythonVersionRelease = {
243
- level : PythonReleaseLevel ;
244
- serial : number ;
243
+ readonly level : PythonReleaseLevel ;
244
+ readonly serial : number ;
245
245
} ;
246
246
247
247
export type VersionInfo = {
248
- major : number | undefined ;
249
- minor : number | undefined ;
250
- micro : number | undefined ;
251
- release : PythonVersionRelease | undefined ;
248
+ readonly major : number | undefined ;
249
+ readonly minor : number | undefined ;
250
+ readonly micro : number | undefined ;
251
+ readonly release : PythonVersionRelease | undefined ;
252
252
} ;
253
253
254
254
export type ResolvedVersionInfo = {
255
- major : number ;
256
- minor : number ;
257
- micro : number ;
258
- release : PythonVersionRelease ;
255
+ readonly major : number ;
256
+ readonly minor : number ;
257
+ readonly micro : number ;
258
+ readonly release : PythonVersionRelease ;
259
259
} ;
0 commit comments