File tree Expand file tree Collapse file tree 7 files changed +14
-12
lines changed Expand file tree Collapse file tree 7 files changed +14
-12
lines changed Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ exports[`Selected Book Page should compile 1`] = `
8
8
>
9
9
<bc-book-detail
10
10
_nghost-c0 = " "
11
+ ng-reflect-in-collection = " false"
11
12
>
12
13
13
14
</bc-book-detail >
Original file line number Diff line number Diff line change @@ -156,6 +156,6 @@ export const isSelectedBookInCollection = createSelector(
156
156
getCollectionBookIds ,
157
157
getSelectedBookId ,
158
158
( ids , selected ) => {
159
- return selected && ids . indexOf ( selected ) > - 1 ;
159
+ return ! ! selected && ids . indexOf ( selected ) > - 1 ;
160
160
}
161
161
) ;
Original file line number Diff line number Diff line change @@ -38,7 +38,7 @@ export class AppComponent {
38
38
showSidenav$ : Observable < boolean > ;
39
39
loggedIn$ : Observable < boolean > ;
40
40
41
- constructor ( private store : Store < fromRoot . State > ) {
41
+ constructor ( private store : Store < fromRoot . State & fromAuth . State > ) {
42
42
/**
43
43
* Selectors can be applied with the `select` operator which passes the state
44
44
* tree to the provided selector
Original file line number Diff line number Diff line change 1
- import {
2
- LayoutActions
3
- } from '@example-app/core/actions' ;
1
+ import { Action } from '@ngrx/store' ;
2
+ import { LayoutActions } from '@example-app/core/actions' ;
4
3
5
4
export interface State {
6
5
showSidenav : boolean ;
@@ -10,11 +9,10 @@ const initialState: State = {
10
9
showSidenav : false ,
11
10
} ;
12
11
13
- export function reducer (
14
- state : State = initialState ,
15
- action : LayoutActions . LayoutActionsUnion
16
- ) : State {
17
- switch ( action . type ) {
12
+ export function reducer ( state : State = initialState , action : Action ) : State {
13
+ const specificAction = action as LayoutActions . LayoutActionsUnion ;
14
+
15
+ switch ( specificAction . type ) {
18
16
case LayoutActions . LayoutActionTypes . CloseSidenav :
19
17
return {
20
18
showSidenav : false ,
Original file line number Diff line number Diff line change @@ -45,7 +45,7 @@ export const reducers: ActionReducerMap<State> = {
45
45
46
46
// console.log all actions
47
47
export function logger ( reducer : ActionReducer < State > ) : ActionReducer < State > {
48
- return ( state : State , action : any ) : any => {
48
+ return ( state , action ) => {
49
49
const result = reducer ( state , action ) ;
50
50
console . groupCollapsed ( action . type ) ;
51
51
console . log ( 'prev state' , state ) ;
Original file line number Diff line number Diff line change 1
1
{
2
2
"compilerOptions" : {
3
+ "strict" : true ,
4
+ "strictPropertyInitialization" : false ,
3
5
"sourceMap" : true ,
4
6
"declaration" : false ,
5
7
"moduleResolution" : " node" ,
Original file line number Diff line number Diff line change 34
34
"@ngrx/schematics/schematics-core" : [
35
35
" ./modules/schematics/schematics-core"
36
36
],
37
- "@example-app/*" : [" ./projects/example-app/src/app/*" ]
37
+ "@example-app/*" : [" ./projects/example-app/src/app/*" ],
38
+ "ngrx-store-freeze" : [" ./projects/ngrx-store-freeze" ]
38
39
}
39
40
},
40
41
"exclude" : [
You can’t perform that action at this time.
0 commit comments