@@ -77,7 +77,7 @@ export async function main(argv: string[]): Promise<any> {
7777 try {
7878
7979 // Check for readonly status and chmod if so if we are told so
80- let targetMode : number ;
80+ let targetMode : number = 0 ;
8181 let restoreMode = false ;
8282 if ( ! ! args [ 'file-chmod' ] ) {
8383 targetMode = fs . statSync ( target ) . mode ;
@@ -132,11 +132,11 @@ export async function main(argv: string[]): Promise<any> {
132132 child . stdout . on ( 'data' , ( data : Buffer ) => console . log ( data . toString ( 'utf8' ) . trim ( ) ) ) ;
133133 child . stderr . on ( 'data' , ( data : Buffer ) => console . log ( data . toString ( 'utf8' ) . trim ( ) ) ) ;
134134
135- return new TPromise < void > ( c => child . once ( 'exit' , ( ) => c ( ) ) ) ;
135+ return new TPromise < void > ( c => child . once ( 'exit' , ( ) => c ( void 0 ) ) ) ;
136136 } ) ;
137137 }
138138
139- let stdinWithoutTty : boolean ;
139+ let stdinWithoutTty : boolean = false ;
140140 try {
141141 stdinWithoutTty = ! process . stdin . isTTY ; // Via https://twitter.com/MylesBorins/status/782009479382626304
142142 } catch ( error ) {
@@ -162,7 +162,7 @@ export async function main(argv: string[]): Promise<any> {
162162 stdinFilePath = paths . join ( os . tmpdir ( ) , `code-stdin-${ Math . random ( ) . toString ( 36 ) . replace ( / [ ^ a - z ] + / g, '' ) . substr ( 0 , 3 ) } .txt` ) ;
163163
164164 // open tmp file for writing
165- let stdinFileError : Error ;
165+ let stdinFileError : Error | undefined ;
166166 let stdinFileStream : fs . WriteStream ;
167167 try {
168168 stdinFileStream = fs . createWriteStream ( stdinFilePath ) ;
@@ -227,7 +227,7 @@ export async function main(argv: string[]): Promise<any> {
227227 // and pass it over to the starting instance. We can use this file
228228 // to wait for it to be deleted to monitor that the edited file
229229 // is closed and then exit the waiting process.
230- let waitMarkerFilePath : string ;
230+ let waitMarkerFilePath : string | undefined ;
231231 if ( args . wait ) {
232232 waitMarkerFilePath = await createWaitMarkerFile ( verbose ) ;
233233 if ( waitMarkerFilePath ) {
@@ -361,10 +361,10 @@ export async function main(argv: string[]): Promise<any> {
361361 return new TPromise < void > ( c => {
362362
363363 // Complete when process exits
364- child . once ( 'exit' , ( ) => c ( null ) ) ;
364+ child . once ( 'exit' , ( ) => c ( void 0 ) ) ;
365365
366366 // Complete when wait marker file is deleted
367- whenDeleted ( waitMarkerFilePath ) . then ( c , c ) ;
367+ whenDeleted ( waitMarkerFilePath ! ) . then ( c , c ) ;
368368 } ) . then ( ( ) => {
369369
370370 // Make sure to delete the tmp stdin file if we have any
0 commit comments