Improvment in tslint standard (#16)

This commit is contained in:
Qolzam
2017-10-10 16:39:02 +07:00
parent 181d2b8abd
commit 1937742f04
160 changed files with 984 additions and 1019 deletions

View File

@@ -1,4 +1,4 @@
import { User,Profile } from "domain/users";
import { User,Profile } from 'domain/users'
/**
* User state
@@ -13,7 +13,7 @@ export class UserState {
* @type {({[userId: string]: Profile} | null)}
* @memberof UserState
*/
info: {[userId: string]: Profile} = {};
info: {[userId: string]: Profile} = {}
/**
* If users profile are loaded
@@ -21,7 +21,7 @@ export class UserState {
* @type {Boolean}
* @memberof UserState
*/
loaded: Boolean = false;
loaded: Boolean = false
/**
* If edit profile is open {true} or not {false}
@@ -29,5 +29,5 @@ export class UserState {
* @type {Boolean}
* @memberof UserState
*/
openEditProfile: Boolean = false;
openEditProfile: Boolean = false
}

View File

@@ -1,3 +1,3 @@
import { userReducer } from "./userReducer";
import { userReducer } from './userReducer'
export {userReducer};
export {userReducer}

View File

@@ -2,15 +2,15 @@
import {UserActionType} from 'constants/userActionType'
// - Import domain
import { User,Profile } from "domain/users";
import { User,Profile } from 'domain/users'
import { UserState } from "./UserState";
import { IUserAction } from "./IUserAction";
import { UserState } from './UserState'
import { IUserAction } from './IUserAction'
/**
* User reducer
*/
export var userReducer = (state: UserState = new UserState(), action: IUserAction) => {
export let userReducer = (state: UserState = new UserState(), action: IUserAction) => {
const { payload } = action
switch (action.type) {
case UserActionType.USER_INFO:
@@ -57,7 +57,7 @@ export var userReducer = (state: UserState = new UserState(), action: IUserActio
case UserActionType.CLEAR_ALL_DATA_USER:
return new UserState();
return new UserState()
case UserActionType.CLOSE_EDIT_PROFILE:
return {
@@ -73,6 +73,6 @@ export var userReducer = (state: UserState = new UserState(), action: IUserActio
default:
return state;
return state
}
}