Skip to content

Commit a2b6a28

Browse files
committed
Enable 'strictPropertyInitialization' with refactor of SessionManager
1 parent 1ac10a0 commit a2b6a28

File tree

5 files changed

+238
-209
lines changed

5 files changed

+238
-209
lines changed

src/features/DebugSession.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ export class DebugSessionFeature extends LanguageClientConsumer
174174
settings.debugging.createTemporaryIntegratedConsole;
175175

176176
if (config.createTemporaryIntegratedConsole) {
177-
this.tempDebugProcess = this.sessionManager.createDebugSessionProcess(settings);
177+
this.tempDebugProcess = await this.sessionManager.createDebugSessionProcess(settings);
178178
this.tempSessionDetails = await this.tempDebugProcess.start(`DebugSession-${this.sessionCount++}`);
179179
}
180180

src/main.ts

+11-11
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ export async function activate(context: vscode.ExtensionContext): Promise<IPower
6565

6666
// Load and validate settings (will prompt for 'cwd' if necessary).
6767
await Settings.validateCwdSetting();
68-
const extensionSettings = Settings.load();
68+
const settings = Settings.load();
6969

7070
vscode.languages.setLanguageConfiguration(
7171
PowerShellLanguageId,
@@ -122,16 +122,16 @@ export async function activate(context: vscode.ExtensionContext): Promise<IPower
122122

123123
// Setup the logger.
124124
logger = new Logger(context.globalStorageUri);
125-
logger.MinimumLogLevel = LogLevel[extensionSettings.developer.editorServicesLogLevel];
125+
logger.MinimumLogLevel = LogLevel[settings.developer.editorServicesLogLevel];
126126

127-
sessionManager =
128-
new SessionManager(
129-
context,
130-
logger,
131-
documentSelector,
132-
PackageJSON.displayName,
133-
PackageJSON.version,
134-
telemetryReporter);
127+
sessionManager = new SessionManager(
128+
context,
129+
settings,
130+
logger,
131+
documentSelector,
132+
PackageJSON.displayName,
133+
PackageJSON.version,
134+
telemetryReporter);
135135

136136
// Register commands that do not require Language client
137137
commandRegistrations = [
@@ -167,7 +167,7 @@ export async function activate(context: vscode.ExtensionContext): Promise<IPower
167167

168168
sessionManager.setLanguageClientConsumers(languageClientConsumers);
169169

170-
if (extensionSettings.startAutomatically) {
170+
if (settings.startAutomatically) {
171171
await sessionManager.start();
172172
}
173173

0 commit comments

Comments
 (0)