Skip to content

Commit eaddf61

Browse files
committed
[Fix angular-redux#17] Toolchain updates
* Updated to Typescript 2.4.1 * Added package-lock.json for npm 5+ users * Turned on Typescript strict mode.
1 parent ae3ec36 commit eaddf61

10 files changed

+267
-12
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,5 @@ lib/
44
examples/counter/node_modules/
55
examples/counter/dist/*
66
npm-debug.log
7-
**/*.ngsummary.json
7+
**/*.ngsummary.json
8+
*.tgz

.npmignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@ node_modules/
22
typings/
33
examples/
44
npm-debug.log
5+
*.tgz

package-lock.json

Lines changed: 249 additions & 0 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
@@ -1,6 +1,6 @@
11
{
22
"name": "@angular-redux/router",
3-
"version": "6.3.0",
3+
"version": "6.3.1",
44
"description": "Keep your Angular 2+ router state in Redux.",
55
"main": "./lib/es5/index.js",
66
"module": "./lib/esm/index.js",
@@ -35,7 +35,7 @@
3535
"redux": "^3.6.0",
3636
"rimraf": "^2.5.4",
3737
"rxjs": "^5.0.1",
38-
"typescript": "^2.1.0",
38+
"typescript": "^2.4.1",
3939
"zone.js": "^0.8.4"
4040
},
4141
"author": "Dag Stuan",

src/reducer.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { UPDATE_LOCATION } from './actions';
55
export const DefaultRouterState: string = '';
66

77
export interface RouterAction extends Action {
8-
payload: string
8+
payload?: string
99
}
1010

1111
export function routerReducer(state: string = DefaultRouterState, action: RouterAction): string {

src/router.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ export class NgReduxRouter {
1818
private currentLocation: string;
1919
private initialLocation: string;
2020

21-
private selectLocationFromState: (state) => string = (state) => state.router;
21+
private selectLocationFromState: (state: any) => string = (state) => state.router;
2222
private urlState: Observable<string>;
2323

2424
private urlStateSubscription: ISubscription;
@@ -65,7 +65,7 @@ export class NgReduxRouter {
6565
*/
6666
initialize(
6767
selectLocationFromState: (state: any) => string = (state) => state.router,
68-
urlState$: Observable<string> = undefined
68+
urlState$: Observable<string> | undefined = undefined
6969
) {
7070
if (this.initialized) {
7171
throw new Error('@angular-redux/router already initialized! If you meant to re-initialize, call destroy first.');

tsconfig.es6.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@
1111
"experimentalDecorators": true,
1212
"removeComments": false,
1313
"declaration": true,
14-
"lib" : ["es2015", "es2015.iterable", "dom"]
14+
"lib" : ["es2015", "es2015.iterable", "dom"],
15+
"skipLibCheck": true
1516
},
1617
"exclude": [
1718
"lib",

tsconfig.esm.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@
1111
"experimentalDecorators": true,
1212
"removeComments": false,
1313
"declaration": true,
14-
"lib" : ["es2015", "es2015.iterable", "dom"]
14+
"lib" : ["es2015", "es2015.iterable", "dom"],
15+
"skipLibCheck": true
1516
},
1617
"exclude": [
1718
"lib",

tsconfig.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,9 @@
1111
"experimentalDecorators": true,
1212
"removeComments": false,
1313
"declaration": true,
14-
"lib" : ["es2015", "es2015.iterable", "dom"]
14+
"lib" : ["es2015", "es2015.iterable", "dom"],
15+
"strict": true,
16+
"skipLibCheck": true
1517
},
1618
"exclude": [
1719
"lib",

yarn.lock

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -189,9 +189,9 @@ tsickle@^0.21.0:
189189
source-map "^0.5.6"
190190
source-map-support "^0.4.2"
191191

192-
typescript@^2.1.0:
193-
version "2.3.0"
194-
resolved "https://registry.yarnpkg.com/typescript/-/typescript-2.3.0.tgz#2e63e09284392bc8158a2444c33e2093795c0418"
192+
typescript@^2.4.1:
193+
version "2.4.1"
194+
resolved "https://registry.yarnpkg.com/typescript/-/typescript-2.4.1.tgz#c3ccb16ddaa0b2314de031e7e6fee89e5ba346bc"
195195

196196
wrappy@1:
197197
version "1.0.2"

0 commit comments

Comments
 (0)