@@ -29,7 +29,7 @@ class LeetCodeManager extends EventEmitter implements ILeetCodeManager {
29
29
30
30
public async getLoginStatus ( channel : vscode . OutputChannel ) : Promise < void > {
31
31
try {
32
- const result = await executeCommand ( channel , "node" , [ leetCodeBinaryPath , "user" ] ) ;
32
+ const result : string = await executeCommand ( channel , "node" , [ leetCodeBinaryPath , "user" ] ) ;
33
33
this . currentUser = result . slice ( "You are now login as" . length ) . trim ( ) ;
34
34
this . userStatus = UserStatus . SignedIn ;
35
35
} catch ( error ) {
@@ -60,7 +60,7 @@ class LeetCodeManager extends EventEmitter implements ILeetCodeManager {
60
60
childProc . on ( "error" , reject ) ;
61
61
const name : string | undefined = await vscode . window . showInputBox ( {
62
62
prompt : "Enter user name." ,
63
- validateInput : ( s : string ) => s && s . trim ( ) ? undefined : "User name must not be empty" ,
63
+ validateInput : ( s : string ) : string | undefined => s && s . trim ( ) ? undefined : "User name must not be empty" ,
64
64
} ) ;
65
65
if ( ! name ) {
66
66
childProc . kill ( ) ;
@@ -70,7 +70,7 @@ class LeetCodeManager extends EventEmitter implements ILeetCodeManager {
70
70
const pwd : string | undefined = await vscode . window . showInputBox ( {
71
71
prompt : "Enter password." ,
72
72
password : true ,
73
- validateInput : ( s : string ) => s ? undefined : "Password must not be empty" ,
73
+ validateInput : ( s : string ) : string | undefined => s ? undefined : "Password must not be empty" ,
74
74
} ) ;
75
75
if ( ! pwd ) {
76
76
childProc . kill ( ) ;
0 commit comments