Skip to content

Commit db774ad

Browse files
author
Kartik Raj
committed
Simplify
1 parent 616fa57 commit db774ad

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/vs/workbench/api/common/extHostTerminalService.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,9 @@ export interface IExtHostTerminalService extends ExtHostTerminalServiceShape, ID
5050
registerLinkProvider(provider: vscode.TerminalLinkProvider): vscode.Disposable;
5151
registerProfileProvider(extension: IExtensionDescription, id: string, provider: vscode.TerminalProfileProvider): vscode.Disposable;
5252
registerTerminalQuickFixProvider(id: string, extensionId: string, provider: vscode.TerminalQuickFixProvider): vscode.Disposable;
53-
getEnvironmentVariableCollection(extension: IExtensionDescription): IDefaultEnvironmentVariableCollection;
53+
getEnvironmentVariableCollection(extension: IExtensionDescription): IEnvironmentVariableCollection;
5454
}
55-
type IDefaultEnvironmentVariableCollection = vscode.EnvironmentVariableCollection | { getScopedEnvironmentVariableCollection(scope: vscode.EnvironmentVariableScope | undefined): vscode.EnvironmentVariableCollection };
55+
type IEnvironmentVariableCollection = vscode.EnvironmentVariableCollection & { getScopedEnvironmentVariableCollection(scope: vscode.EnvironmentVariableScope | undefined): vscode.EnvironmentVariableCollection };
5656
export interface ITerminalInternalOptions {
5757
isFeatureTerminal?: boolean;
5858
useShellEnvironment?: boolean;
@@ -823,7 +823,7 @@ export abstract class BaseExtHostTerminalService extends Disposable implements I
823823
return index;
824824
}
825825

826-
public getEnvironmentVariableCollection(extension: IExtensionDescription): IDefaultEnvironmentVariableCollection {
826+
public getEnvironmentVariableCollection(extension: IExtensionDescription): IEnvironmentVariableCollection {
827827
let collection = this._environmentVariableCollections.get(extension.identifier.value);
828828
if (!collection) {
829829
collection = new EnvironmentVariableCollection();
@@ -888,7 +888,7 @@ class EnvironmentVariableCollection {
888888
this.map = new Map(serialized);
889889
}
890890

891-
getScopedEnvironmentVariableCollection(scope: vscode.EnvironmentVariableScope | undefined): IDefaultEnvironmentVariableCollection {
891+
getScopedEnvironmentVariableCollection(scope: vscode.EnvironmentVariableScope | undefined): IEnvironmentVariableCollection {
892892
const scopedCollectionKey = this.getScopeKey(scope);
893893
let scopedCollection = this.scopedCollections.get(scopedCollectionKey);
894894
if (!scopedCollection) {
@@ -1004,7 +1004,7 @@ class EnvironmentVariableCollection {
10041004
}
10051005
}
10061006

1007-
class ScopedEnvironmentVariableCollection implements vscode.EnvironmentVariableCollection, IDefaultEnvironmentVariableCollection {
1007+
class ScopedEnvironmentVariableCollection implements vscode.EnvironmentVariableCollection, IEnvironmentVariableCollection {
10081008
public get persistent(): boolean { return this.collection.persistent; }
10091009
public set persistent(value: boolean) {
10101010
this.collection.persistent = value;

src/vscode-dts/vscode.proposed.envCollectionWorkspace.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ declare module 'vscode' {
1414
// *
1515
// * @param scope The scope to which the environment variable collection applies to.
1616
// */
17-
// readonly environmentVariableCollection: EnvironmentVariableCollection | { getScopedEnvironmentVariableCollection(scope: EnvironmentVariableScope): EnvironmentVariableCollection };
17+
// readonly environmentVariableCollection: EnvironmentVariableCollection & { getScopedEnvironmentVariableCollection(scope: EnvironmentVariableScope): EnvironmentVariableCollection };
1818
// }
1919

2020
export type EnvironmentVariableScope = {

0 commit comments

Comments
 (0)