@@ -29,7 +29,7 @@ class LeetCodeManager extends EventEmitter implements ILeetCodeManager {
2929
3030 public async getLoginStatus ( channel : vscode . OutputChannel ) : Promise < void > {
3131 try {
32- const result = await executeCommand ( channel , "node" , [ leetCodeBinaryPath , "user" ] ) ;
32+ const result : string = await executeCommand ( channel , "node" , [ leetCodeBinaryPath , "user" ] ) ;
3333 this . currentUser = result . slice ( "You are now login as" . length ) . trim ( ) ;
3434 this . userStatus = UserStatus . SignedIn ;
3535 } catch ( error ) {
@@ -60,7 +60,7 @@ class LeetCodeManager extends EventEmitter implements ILeetCodeManager {
6060 childProc . on ( "error" , reject ) ;
6161 const name : string | undefined = await vscode . window . showInputBox ( {
6262 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" ,
6464 } ) ;
6565 if ( ! name ) {
6666 childProc . kill ( ) ;
@@ -70,7 +70,7 @@ class LeetCodeManager extends EventEmitter implements ILeetCodeManager {
7070 const pwd : string | undefined = await vscode . window . showInputBox ( {
7171 prompt : "Enter password." ,
7272 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" ,
7474 } ) ;
7575 if ( ! pwd ) {
7676 childProc . kill ( ) ;
0 commit comments