@@ -10,13 +10,13 @@ export class CustomerState {
1010 customer : CustomerEntity ;
1111 customerErrors : CustomerErrors ;
1212
13- public constructor ( ) {
13+ constructor ( ) {
1414 this . customer = new CustomerEntity ( ) ;
1515 this . customerErrors = new CustomerErrors ( ) ;
1616 }
1717}
1818
19- export let customerReducer = ( state : CustomerState = new CustomerState ( ) , action ) : CustomerState => {
19+ export const customerReducer = ( state : CustomerState = new CustomerState ( ) , action ) : CustomerState => {
2020 switch ( action . type ) {
2121 case actionsDef . customer . CUSTOMER_PROCESS_UI_INPUT_COMPLETED :
2222 return customerProcessUIInputCompleted ( state , action ) ;
@@ -30,11 +30,11 @@ export let customerReducer = (state: CustomerState = new CustomerState(), action
3030}
3131
3232function customerProcessUIInputCompleted ( state : CustomerState , action : ICustomerUIInputCompletedAction ) : CustomerState {
33- let newCustomer : CustomerEntity = Object . assign ( { } , state . customer , {
33+ const newCustomer : CustomerEntity = Object . assign ( { } , state . customer , {
3434 [ action . fieldName ] : action . value
3535 } ) ;
3636
37- let newCustomerErrors : CustomerErrors = Object . assign ( { } , state . customerErrors , {
37+ const newCustomerErrors : CustomerErrors = Object . assign ( { } , state . customerErrors , {
3838 [ action . fieldName ] : action . fieldValidationResult
3939 } ) ;
4040
@@ -45,7 +45,7 @@ function customerProcessUIInputCompleted(state: CustomerState, action: ICustomer
4545}
4646
4747function customerSaveCompleted ( state : CustomerState , action : ICustomerSaveCompletedAction ) : CustomerState {
48- let newCustomerErrors : CustomerErrors = Object . assign ( { } , state . customerErrors ) ;
48+ const newCustomerErrors : CustomerErrors = Object . assign ( { } , state . customerErrors ) ;
4949
5050 action . formValidationResult . fieldErrors . forEach ( fieldValidationResult => {
5151 newCustomerErrors [ fieldValidationResult . key ] = fieldValidationResult ;
0 commit comments