2
2
3
3
import * as fs from 'fs' ;
4
4
import * as path from 'path' ;
5
- import { spawn } from 'child_process' ;
6
5
7
6
import * as cpp from 'child-process-promise' ;
8
7
9
- import { commands , workspace , Disposable , ExtensionContext , Uri } from 'vscode' ;
10
- import { Executable , LanguageClient , LanguageClientOptions , SettingMonitor , ServerOptions , TransportKind } from 'vscode-languageclient' ;
11
- import * as lc from 'vscode-languageclient' ;
8
+ import { ExtensionContext } from 'vscode' ;
12
9
import * as vscode from 'vscode' ;
10
+ import { LanguageClient , LanguageClientOptions , ServerOptions } from 'vscode-languageclient' ;
13
11
14
12
let extensionContext : ExtensionContext
15
13
let outputChannel : vscode . OutputChannel
@@ -45,7 +43,7 @@ export function activate(context: ExtensionContext) {
45
43
} )
46
44
}
47
45
48
- function fetchAndRun ( artifact : String ) {
46
+ function fetchAndRun ( artifact : string ) {
49
47
const coursierPath = path . join ( extensionContext . extensionPath , './out/coursier' ) ;
50
48
51
49
vscode . window . withProgress ( {
@@ -64,15 +62,15 @@ function fetchAndRun(artifact: String) {
64
62
65
63
let classPath = ""
66
64
67
- coursierProc . stdout . on ( 'data' , ( data ) => {
65
+ coursierProc . stdout . on ( 'data' , ( data : Buffer ) => {
68
66
classPath += data . toString ( ) . trim ( )
69
67
} )
70
- coursierProc . stderr . on ( 'data' , ( data ) => {
68
+ coursierProc . stderr . on ( 'data' , ( data : Buffer ) => {
71
69
let msg = data . toString ( )
72
70
outputChannel . append ( msg )
73
71
} )
74
72
75
- coursierProc . on ( 'close' , ( code ) => {
73
+ coursierProc . on ( 'close' , ( code : number ) => {
76
74
if ( code != 0 ) {
77
75
let msg = "Fetching the language server failed."
78
76
outputChannel . append ( msg )
0 commit comments