@@ -144,7 +144,7 @@ export function formatOptions(docOptions: Option[], columns: number): string[] {
144144 return docOptions . reduce < string [ ] > ( ( r , o , i ) => r . concat ( [ ` ${ usageTexts [ i ] } ` , ` ${ o . description } ` ] ) , [ ] ) ;
145145 }
146146 let descriptionColumns = columns - argLength - 1 ;
147- let result = [ ] ;
147+ let result : string [ ] = [ ] ;
148148 docOptions . forEach ( ( o , i ) => {
149149 let usage = usageTexts [ i ] ;
150150 let wrappedDescription = wrapText ( o . description ! , descriptionColumns ) ;
@@ -162,7 +162,7 @@ function indent(count: number): string {
162162}
163163
164164function wrapText ( text : string , columns : number ) : string [ ] {
165- let lines = [ ] ;
165+ let lines : string [ ] = [ ] ;
166166 while ( text . length ) {
167167 let index = text . length < columns ? text . length : text . lastIndexOf ( ' ' , columns ) ;
168168 let line = text . slice ( 0 , index ) . trim ( ) ;
@@ -198,8 +198,8 @@ export function buildHelpMessage(productName: string, executableName: string, ve
198198 return help . join ( '\n' ) ;
199199}
200200
201- export function buildVersionMessage ( version : string , commit : string ) {
202- return `${ version || ' Unknown version' } \n${ commit || ' Unknown commit' } \n${ process . arch } ` ;
201+ export function buildVersionMessage ( version : string | undefined , commit : string | undefined ) : string {
202+ return `${ version || localize ( 'unknownVersion' , " Unknown version" ) } \n${ commit || localize ( 'unknownCommit' , " Unknown commit" ) } \n${ process . arch } ` ;
203203}
204204
205205/**
0 commit comments