@@ -24,7 +24,7 @@ export class CodeBuilder {
2424
2525 indentationCharacter : string = DEFAULT_INDENTATION_CHARACTER ;
2626
27- lineJoin = DEFAULT_LINE_JOIN ;
27+ lineJoin : string = DEFAULT_LINE_JOIN ;
2828
2929 /**
3030 * Helper object to format and aggragate lines of code.
@@ -46,30 +46,30 @@ export class CodeBuilder {
4646 /**
4747 * Add the line at the beginning of the current lines
4848 */
49- unshift = ( line : string , indentationLevel ?: number ) => {
49+ unshift = ( line : string , indentationLevel ?: number ) : void => {
5050 const newLine = this . indentLine ( line , indentationLevel ) ;
5151 this . code . unshift ( newLine ) ;
5252 } ;
5353
5454 /**
5555 * Add the line at the end of the current lines
5656 */
57- push = ( line : string , indentationLevel ?: number ) => {
57+ push = ( line : string , indentationLevel ?: number ) : void => {
5858 const newLine = this . indentLine ( line , indentationLevel ) ;
5959 this . code . push ( newLine ) ;
6060 } ;
6161
6262 /**
6363 * Add an empty line at the end of current lines
6464 */
65- blank = ( ) => {
65+ blank = ( ) : void => {
6666 this . code . push ( '' ) ;
6767 } ;
6868
6969 /**
7070 * Concatenate all current lines using the given lineJoin, then apply any replacers that may have been added
7171 */
72- join = ( ) => {
72+ join = ( ) : string => {
7373 const unreplacedCode = this . code . join ( this . lineJoin ) ;
7474 const replacedOutput = this . postProcessors . reduce ( ( accumulator , replacer ) => replacer ( accumulator ) , unreplacedCode ) ;
7575 return replacedOutput ;
@@ -79,7 +79,7 @@ export class CodeBuilder {
7979 * Often when writing modules you may wish to add a literal tag or bit of metadata that you wish to transform after other processing as a final step.
8080 * To do so, you can provide a PostProcessor function and it will be run automatically for you when you call `join()` later on.
8181 */
82- addPostProcessor = ( postProcessor : PostProcessor ) => {
82+ addPostProcessor = ( postProcessor : PostProcessor ) : void => {
8383 this . postProcessors = [ ...this . postProcessors , postProcessor ] ;
8484 } ;
8585}
0 commit comments