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

@@ -3,13 +3,13 @@ import moment from 'moment'
import _ from 'lodash'
// - Import domain
import { Notification } from "domain/notifications";
import { Notification } from 'domain/notifications'
// - Import action types
import {NotificationActionType} from 'constants/notificationActionType'
import { NotificationState } from "./NotificationState";
import { INotificationAction } from "./INotificationAction";
import { NotificationState } from './NotificationState'
import { INotificationAction } from './INotificationAction'
/**
@@ -17,8 +17,8 @@ import { INotificationAction } from "./INotificationAction";
* @param {object} state
* @param {object} action
*/
export var notificationReducer = (state: NotificationState = new NotificationState(), action: INotificationAction) => {
var { payload } = action
export let notificationReducer = (state: NotificationState = new NotificationState(), action: INotificationAction) => {
let { payload } = action
switch (action.type) {
/* _____________ CRUD _____________ */
@@ -48,7 +48,7 @@ export var notificationReducer = (state: NotificationState = new NotificationSta
}
case NotificationActionType.DELETE_NOTIFY:
var parsedNotifies = {}
let parsedNotifies = {}
Object.keys(state.userNotifies!).map((id) => {
if (id !== payload) {
_.merge(parsedNotifies, { [id]: { ...state.userNotifies![id] } })
@@ -68,7 +68,7 @@ export var notificationReducer = (state: NotificationState = new NotificationSta
default:
return state;
return state
}