Skip to content

Commit 0e37854

Browse files
committed
Use classes instead of interfaces
1 parent c907d1c commit 0e37854

File tree

6 files changed

+101
-204
lines changed

6 files changed

+101
-204
lines changed

src/features/HelpCompletion.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import {
77
} from "vscode";
88
import { RequestType } from "vscode-languageclient";
99
import { LanguageClient } from "vscode-languageclient/node";
10-
import { ISettings, CommentType, getSettings } from "../settings";
10+
import { Settings, CommentType, getSettings } from "../settings";
1111
import { LanguageClientConsumer } from "../languageClientConsumer";
1212

1313
// eslint-disable-next-line @typescript-eslint/no-empty-interface
@@ -27,7 +27,7 @@ enum SearchState { Searching, Locked, Found }
2727
export class HelpCompletionFeature extends LanguageClientConsumer {
2828
private helpCompletionProvider: HelpCompletionProvider | undefined;
2929
private disposable: Disposable | undefined;
30-
private settings: ISettings;
30+
private settings: Settings;
3131

3232
constructor() {
3333
super();
@@ -125,7 +125,7 @@ class HelpCompletionProvider {
125125
private lastChangeRange: Range | undefined;
126126
private lastDocument: TextDocument | undefined;
127127
private langClient: LanguageClient | undefined;
128-
private settings: ISettings;
128+
private settings: Settings;
129129

130130
constructor() {
131131
this.triggerFinderHelpComment = new TriggerFinder("##");

src/platform.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import * as os from "os";
55
import * as path from "path";
66
import * as process from "process";
77
import { integer } from "vscode-languageserver-protocol";
8-
import { IPowerShellAdditionalExePathSettings } from "./settings";
8+
import { PowerShellAdditionalExePathSettings } from "./settings";
99

1010
// This uses require so we can rewire it in unit tests!
1111
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-var-requires
@@ -79,7 +79,7 @@ export class PowerShellExeFinder {
7979
private readonly platformDetails: IPlatformDetails;
8080

8181
// Additional configured PowerShells
82-
private readonly additionalPSExeSettings: IPowerShellAdditionalExePathSettings;
82+
private readonly additionalPSExeSettings: PowerShellAdditionalExePathSettings;
8383

8484
private winPS: IPossiblePowerShellExe | undefined;
8585

@@ -92,7 +92,7 @@ export class PowerShellExeFinder {
9292
*/
9393
constructor(
9494
platformDetails?: IPlatformDetails,
95-
additionalPowerShellExes?: IPowerShellAdditionalExePathSettings) {
95+
additionalPowerShellExes?: PowerShellAdditionalExePathSettings) {
9696

9797
this.platformDetails = platformDetails ?? getPlatformDetails();
9898
this.additionalPSExeSettings = additionalPowerShellExes ?? {};

src/process.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ export class PowerShellProcess {
3131
private logger: Logger,
3232
private startPsesArgs: string,
3333
private sessionFilePath: vscode.Uri,
34-
private sessionSettings: Settings.ISettings) {
34+
private sessionSettings: Settings.Settings) {
3535

3636
this.onExited = this.onExitedEmitter.event;
3737
}

src/session.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import TelemetryReporter, { TelemetryEventProperties, TelemetryEventMeasurements
99
import { Message } from "vscode-jsonrpc";
1010
import { Logger } from "./logging";
1111
import { PowerShellProcess } from "./process";
12-
import { ISettings, changeSetting, getSettings, getEffectiveConfigurationTarget, validateCwdSetting } from "./settings";
12+
import { Settings, changeSetting, getSettings, getEffectiveConfigurationTarget, validateCwdSetting } from "./settings";
1313
import utils = require("./utils");
1414

1515
import {
@@ -102,7 +102,7 @@ export class SessionManager implements Middleware {
102102

103103
constructor(
104104
private extensionContext: vscode.ExtensionContext,
105-
private sessionSettings: ISettings,
105+
private sessionSettings: Settings,
106106
private logger: Logger,
107107
private documentSelector: DocumentSelector,
108108
hostName: string,
@@ -234,7 +234,7 @@ export class SessionManager implements Middleware {
234234
return vscode.Uri.joinPath(this.sessionsFolder, `PSES-VSCode-${process.env.VSCODE_PID}-${uniqueId}.json`);
235235
}
236236

237-
public async createDebugSessionProcess(settings: ISettings): Promise<PowerShellProcess> {
237+
public async createDebugSessionProcess(settings: Settings): Promise<PowerShellProcess> {
238238
// NOTE: We only support one temporary Extension Terminal at a time. To
239239
// support more, we need to track each separately, and tie the session
240240
// for the event handler to the right process (and dispose of the event

0 commit comments

Comments
 (0)