Improvment in tslint standard (#16)
This commit is contained in:
@@ -12,7 +12,7 @@ export class AuthorizeState {
|
||||
* @type {number}
|
||||
* @memberof AuthorizeState
|
||||
*/
|
||||
uid: number = 0;
|
||||
uid: number = 0
|
||||
|
||||
/**
|
||||
* If user is authed {true} or not {false}
|
||||
@@ -20,7 +20,7 @@ export class AuthorizeState {
|
||||
* @type {Boolean}
|
||||
* @memberof AuthorizeState
|
||||
*/
|
||||
authed: Boolean = false;
|
||||
authed: Boolean = false
|
||||
|
||||
/**
|
||||
* If user password is updated {true} or not {false}
|
||||
@@ -28,7 +28,7 @@ export class AuthorizeState {
|
||||
* @type {Boolean}
|
||||
* @memberof AuthorizeState
|
||||
*/
|
||||
updatePassword: Boolean = false;
|
||||
updatePassword: Boolean = false
|
||||
|
||||
/**
|
||||
* If the user is guest {true} or not {false}
|
||||
@@ -36,5 +36,5 @@ export class AuthorizeState {
|
||||
* @type {Boolean}
|
||||
* @memberof AuthorizeState
|
||||
*/
|
||||
guest: Boolean = false;
|
||||
guest: Boolean = false
|
||||
}
|
||||
@@ -9,7 +9,7 @@ import {AuthorizeActionType} from 'constants/authorizeActionType'
|
||||
* @interface IAuthorizeAction
|
||||
*/
|
||||
export interface IAuthorizeAction {
|
||||
payload: any;
|
||||
type: AuthorizeActionType;
|
||||
payload: any
|
||||
type: AuthorizeActionType
|
||||
|
||||
}
|
||||
@@ -1,11 +1,11 @@
|
||||
// - Import react components
|
||||
import {Reducer, Action} from "redux";
|
||||
import {Reducer, Action} from 'redux'
|
||||
|
||||
// - Import action types
|
||||
import {AuthorizeActionType} from 'constants/authorizeActionType'
|
||||
|
||||
import { IAuthorizeAction } from "./IAuthorizeAction";
|
||||
import { AuthorizeState } from "./AuthorizeState";
|
||||
import { IAuthorizeAction } from './IAuthorizeAction'
|
||||
import { AuthorizeState } from './AuthorizeState'
|
||||
|
||||
|
||||
|
||||
@@ -14,8 +14,8 @@ import { AuthorizeState } from "./AuthorizeState";
|
||||
* @param {object} state
|
||||
* @param {object} action
|
||||
*/
|
||||
export var authorizeReducer = (state : AuthorizeState = new AuthorizeState(), action: IAuthorizeAction) =>{
|
||||
const { payload } = action;
|
||||
export let authorizeReducer = (state : AuthorizeState = new AuthorizeState(), action: IAuthorizeAction) =>{
|
||||
const { payload } = action
|
||||
switch (action.type) {
|
||||
case AuthorizeActionType.LOGIN:
|
||||
return{
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
import { authorizeReducer } from "./authorizeReducer";
|
||||
import { authorizeReducer } from './authorizeReducer'
|
||||
|
||||
export {authorizeReducer};
|
||||
export {authorizeReducer}
|
||||
Reference in New Issue
Block a user