File tree 8 files changed +22
-16
lines changed
8 files changed +22
-16
lines changed Original file line number Diff line number Diff line change @@ -60,9 +60,7 @@ interface IShowInputPromptResponseBody {
60
60
}
61
61
62
62
63
- function showChoicePrompt (
64
- promptDetails : IShowChoicePromptRequestArgs ,
65
- client : LanguageClient ) : Thenable < IShowChoicePromptResponseBody > {
63
+ function showChoicePrompt ( promptDetails : IShowChoicePromptRequestArgs ) : Thenable < IShowChoicePromptResponseBody > {
66
64
67
65
let resultThenable : Thenable < IShowChoicePromptResponseBody > ;
68
66
@@ -226,7 +224,7 @@ export class ConsoleFeature extends LanguageClientConsumer {
226
224
this . handlers = [
227
225
this . languageClient . onRequest (
228
226
ShowChoicePromptRequestType ,
229
- ( promptDetails ) => showChoicePrompt ( promptDetails , this . languageClient ) ) ,
227
+ ( promptDetails ) => showChoicePrompt ( promptDetails ) ) ,
230
228
231
229
this . languageClient . onRequest (
232
230
ShowInputPromptRequestType ,
Original file line number Diff line number Diff line change @@ -100,13 +100,12 @@ class PowerShellContentProvider implements vscode.TextDocumentContentProvider {
100
100
101
101
public closeView ( id : string ) {
102
102
const uriString = this . getUri ( id ) ;
103
- const view : CustomView = this . viewIndex [ uriString ] ;
104
103
105
104
vscode . workspace . textDocuments . some ( ( doc ) => {
106
105
if ( doc . uri . toString ( ) === uriString ) {
107
106
vscode . window
108
107
. showTextDocument ( doc )
109
- . then ( ( editor ) => vscode . commands . executeCommand ( "workbench.action.closeActiveEditor" ) ) ;
108
+ . then ( ( _ ) => vscode . commands . executeCommand ( "workbench.action.closeActiveEditor" ) ) ;
110
109
111
110
return true ;
112
111
}
Original file line number Diff line number Diff line change @@ -320,12 +320,12 @@ export class ExtensionCommandsFeature extends LanguageClientConsumer {
320
320
a . name . localeCompare ( b . name ) ) ;
321
321
}
322
322
323
- private showExtensionCommands ( client : LanguageClient ) : Thenable < IInvokeExtensionCommandRequestArguments > {
323
+ private showExtensionCommands ( client : LanguageClient ) : Thenable < void > {
324
324
// If no extension commands are available, show a message
325
325
if ( this . extensionCommands . length === 0 ) {
326
326
vscode . window . showInformationMessage (
327
327
"No extension commands have been loaded into the current session." ) ;
328
- return ;
328
+ return undefined ;
329
329
}
330
330
331
331
const quickPickItems =
@@ -337,7 +337,7 @@ export class ExtensionCommandsFeature extends LanguageClientConsumer {
337
337
} ;
338
338
} ) ;
339
339
340
- vscode . window
340
+ return vscode . window
341
341
. showQuickPick (
342
342
quickPickItems ,
343
343
{ placeHolder : "Select a command" } )
@@ -418,7 +418,7 @@ export class ExtensionCommandsFeature extends LanguageClientConsumer {
418
418
promise =
419
419
vscode . workspace . openTextDocument ( filePath )
420
420
. then ( ( doc ) => vscode . window . showTextDocument ( doc ) )
421
- . then ( ( editor ) => vscode . commands . executeCommand ( "workbench.action.closeActiveEditor" ) )
421
+ . then ( ( _ ) => vscode . commands . executeCommand ( "workbench.action.closeActiveEditor" ) )
422
422
. then ( ( _ ) => EditorOperationResponse . Completed ) ;
423
423
} else {
424
424
promise = Promise . resolve ( EditorOperationResponse . Completed ) ;
Original file line number Diff line number Diff line change @@ -89,6 +89,7 @@ ${this.generateExtensionTable(extensions)}
89
89
if ( e . packageJSON . isBuiltin === false ) {
90
90
return `|${ e . packageJSON . name } |${ e . packageJSON . publisher } |${ e . packageJSON . version } |` ;
91
91
}
92
+ return undefined ;
92
93
} ) . join ( "\n" ) ;
93
94
94
95
const extensionTable = `
Original file line number Diff line number Diff line change @@ -101,7 +101,7 @@ class CommandsExplorerProvider implements vscode.TreeDataProvider<Command> {
101
101
return element ;
102
102
}
103
103
104
- public getChildren ( element ?: Command ) : Thenable < Command [ ] > {
104
+ public getChildren ( _element ?: Command ) : Thenable < Command [ ] > {
105
105
return Promise . resolve ( this . powerShellCommands || [ ] ) ;
106
106
}
107
107
}
@@ -135,7 +135,7 @@ class Command extends vscode.TreeItem {
135
135
} ;
136
136
}
137
137
138
- public async getChildren ( element ?) : Promise < Command [ ] > {
138
+ public async getChildren ( _element ?) : Promise < Command [ ] > {
139
139
return [ ] ;
140
140
// Returning an empty array because we need to return something.
141
141
}
Original file line number Diff line number Diff line change @@ -66,9 +66,10 @@ export class RemoteFilesFeature extends LanguageClientConsumer {
66
66
67
67
return vscode . window
68
68
. showTextDocument ( doc )
69
- . then ( ( editor ) => vscode . commands . executeCommand ( "workbench.action.closeActiveEditor" ) )
69
+ . then ( ( _ ) => vscode . commands . executeCommand ( "workbench.action.closeActiveEditor" ) )
70
70
. then ( ( _ ) => innerCloseFiles ( ) ) ;
71
71
}
72
+ return undefined ;
72
73
}
73
74
74
75
innerCloseFiles ( ) ;
Original file line number Diff line number Diff line change @@ -104,6 +104,7 @@ export class PowerShellExeFinder {
104
104
for await ( const pwsh of this . enumeratePowerShellInstallations ( ) ) {
105
105
return pwsh ;
106
106
}
107
+ return undefined ;
107
108
}
108
109
109
110
/**
@@ -244,6 +245,9 @@ export class PowerShellExeFinder {
244
245
245
246
case OperatingSystem . Windows :
246
247
return await this . findPSCoreWindowsInstallation ( ) ;
248
+
249
+ case OperatingSystem . Unknown :
250
+ return undefined ;
247
251
}
248
252
}
249
253
@@ -257,6 +261,9 @@ export class PowerShellExeFinder {
257
261
258
262
case OperatingSystem . Windows :
259
263
return await this . findPSCoreWindowsInstallation ( { findPreview : true } ) ;
264
+
265
+ case OperatingSystem . Unknown :
266
+ return undefined ;
260
267
}
261
268
}
262
269
Original file line number Diff line number Diff line change 13
13
"rootDir" : " ." ,
14
14
// TODO: We need to enable stricter checking...
15
15
// "strict": true,
16
- // "noImplicitReturns": true,
17
- // "noFallthroughCasesInSwitch": true,
18
- // "noUnusedParameters": true
16
+ "noImplicitReturns" : true ,
17
+ "noFallthroughCasesInSwitch" : true ,
18
+ "noUnusedParameters" : true
19
19
},
20
20
"include" : [ " src" , " test" ],
21
21
}
You can’t perform that action at this time.
0 commit comments