Skip to content

Commit c1ae59e

Browse files
Updates for stricter TSConfig settings. (#46)
Unfortunately `noUnusedLocals` and `noUnusedParameters` cause propblems for AoT and `@Output`-related EventEmitters. See angular/angular#17131 Once that's fixed in Angular itself then we can turn those checks back on here. Note that they work already in JiT mode.
1 parent ecb9cf3 commit c1ae59e

File tree

17 files changed

+93
-54
lines changed

17 files changed

+93
-54
lines changed

package-lock.json

Lines changed: 9 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@
1313
},
1414
"private": true,
1515
"dependencies": {
16-
"@angular-redux/form": "^6.3.0",
16+
"@angular-redux/form": "^6.5.2",
1717
"@angular-redux/router": "^6.3.1",
18-
"@angular-redux/store": "^6.5.5",
18+
"@angular-redux/store": "^6.5.6",
1919
"@angular/common": "^4.1.0",
2020
"@angular/compiler": "^4.1.0",
2121
"@angular/core": "^4.1.0",

src/app/animals/animal/component.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
import { Component, Input, ChangeDetectionStrategy } from '@angular/core';
2-
import { NgRedux, dispatch, select, select$, WithSubStore } from '@angular-redux/store';
2+
import { dispatch, select, select$, WithSubStore } from '@angular-redux/store';
33
import { Observable } from 'rxjs/Observable';
44

5-
import { IAppState } from '../../store/model';
65
import { animalComponentReducer } from './reducers';
76
import { IAnimal } from '../model';
87

src/app/animals/animal/reducers.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Reducer, Action, combineReducers } from 'redux';
1+
import { Reducer, Action } from 'redux';
22
import { AnimalComponent } from './component';
33

44
export const ticketsReducer: Reducer<number> = (state = 0, action: Action): number => {

src/app/animals/api/epics.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,10 @@ import 'rxjs/add/operator/do';
77
import 'rxjs/add/operator/startWith';
88

99
import { IAppState } from '../../store/model';
10-
import { AnimalType, ANIMAL_TYPES } from '../model';
10+
import { AnimalType } from '../model';
1111
import { AnimalAPIAction, AnimalAPIActions } from './actions';
1212
import { AnimalAPIService } from './service';
1313

14-
type Predicate = (any) => boolean;
15-
1614
const animalsNotAlreadyFetched = (
1715
animalType: AnimalType,
1816
state: IAppState): boolean => !(
@@ -35,12 +33,12 @@ export class AnimalAPIEpics {
3533
return createEpicMiddleware(this.createLoadAnimalEpic(animalType));
3634
}
3735

38-
private createLoadAnimalEpic(animalType): Epic<AnimalAPIAction, IAppState> {
36+
private createLoadAnimalEpic(animalType: AnimalType): Epic<AnimalAPIAction, IAppState> {
3937
return (action$, store) => action$
4038
.ofType(AnimalAPIActions.LOAD_ANIMALS)
4139
.filter(action => actionIsForCorrectAnimalType(animalType)(action))
4240
.filter(() => animalsNotAlreadyFetched(animalType, store.getState()))
43-
.switchMap(a => this.service.getAll(animalType)
41+
.switchMap(() => this.service.getAll(animalType)
4442
.map(data => this.actions.loadSucceeded(animalType, data))
4543
.catch(response => of(this.actions.loadFailed(animalType, {
4644
status: '' + response.status,

src/app/animals/api/reducer.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { AnimalAPIAction, AnimalAPIActions } from './actions';
2-
import { IAnimalList, IAnimal, AnimalType } from '../model';
2+
import { IAnimalList, AnimalType } from '../model';
33
import { indexBy, prop } from 'ramda';
44
import { Action } from 'redux';
55

src/app/elephants/page.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import { Observable } from 'rxjs/Observable';
55

66
import { AnimalAPIActions } from '../animals/api/actions';
77
import { ANIMAL_TYPES, IAnimal } from '../animals/model';
8-
import { IAppState } from '../store/model';
98

109
export const sortAnimals = (animalDictionary$: Observable<{}>) =>
1110
animalDictionary$.map(

src/app/feedback/page.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
import { Component, ChangeDetectionStrategy } from '@angular/core';
2-
import { Connect } from '@angular-redux/form';
3-
import { NgRedux, select$ } from '@angular-redux/store';
2+
import { select$ } from '@angular-redux/store';
43
import { Observable } from 'rxjs/Observable';
5-
import { of } from 'rxjs/observable/of';
6-
import { IAppState } from '../store/model';
74

85
const MAX_COMMENT_CHARS = 300;
96

src/app/lions/page.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import { pipe, values, sortBy, prop } from 'ramda';
55

66
import { AnimalAPIActions } from '../animals/api/actions';
77
import { ANIMAL_TYPES, IAnimal } from '../animals/model';
8-
import { IAppState } from '../store/model';
98

109
export const sortAnimals = (animalDictionary$: Observable<{}>) =>
1110
animalDictionary$.map(

src/app/store/epics.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import { Injectable } from '@angular/core';
2-
import { combineEpics } from 'redux-observable';
32

43
import { ANIMAL_TYPES } from '../animals/model';
54
import { AnimalAPIEpics } from '../animals/api/epics';

0 commit comments

Comments
 (0)