Skip to content
This repository has been archived by the owner on Jan 10, 2018. It is now read-only.

style: fix tslint warnings #320

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions spec/edge.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ describe('ngRx Store', () => {
let todosCountNextCount = 0;

store.select('todos').subscribe((todos: any[]) => {
todosNextCount++
store.dispatch({ type: 'SET_COUNT', payload: todos.length })
todosNextCount++;
store.dispatch({ type: 'SET_COUNT', payload: todos.length });
});

store.select('todoCount').subscribe(count => {
Expand Down
2 changes: 1 addition & 1 deletion spec/fixtures/counter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ export const INCREMENT = 'INCREMENT';
export const DECREMENT = 'DECREMENT';
export const RESET = 'RESET';

export function counterReducer(state = 0, action){
export function counterReducer(state = 0, action) {
switch (action.type) {
case INCREMENT:
return state + 1;
Expand Down
22 changes: 11 additions & 11 deletions spec/fixtures/edge_todos.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,42 +5,42 @@ const todo = (state, action) => {
id: action.payload.id,
text: action.payload.text,
completed: false
}
};
case 'TOGGLE_TODO':
if (state.id !== action.id) {
return state
return state;
}

return Object.assign({}, state, {
completed: !state.completed
})
});

default:
return state
return state;
}
}
};

export const todos = (state = [], action) => {
switch (action.type) {
case 'ADD_TODO':
return [
...state,
todo(undefined, action)
]
];
case 'TOGGLE_TODO':
return state.map(t =>
todo(t, action)
)
);
default:
return state
return state;
}
}
};

export const todoCount = (state = 0, action) => {
switch(action.type){
switch (action.type) {
case 'SET_COUNT':
return action.payload;
default:
return state;
}
}
};
2 changes: 1 addition & 1 deletion src/ng2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ export function provideStore(_reducer: any, _initialState?: any): any[] {

@NgModule({})
export class StoreModule {
static provideStore(_reducer: any, _initialState?:any): ModuleWithProviders {
static provideStore(_reducer: any, _initialState?: any): ModuleWithProviders {
return {
ngModule: StoreModule,
providers: provideStore(_reducer, _initialState)
Expand Down