Skip to content

Commit

Permalink
[Fix angular-redux#17] Toolchain updates
Browse files Browse the repository at this point in the history
* Updated to Typescript 2.4.1
* Added package-lock.json for npm 5+ users
* Turned on Typescript strict mode.
  • Loading branch information
SethDavenport committed Jul 9, 2017
1 parent ae3ec36 commit eaddf61
Show file tree
Hide file tree
Showing 10 changed files with 267 additions and 12 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ lib/
examples/counter/node_modules/
examples/counter/dist/*
npm-debug.log
**/*.ngsummary.json
**/*.ngsummary.json
*.tgz
1 change: 1 addition & 0 deletions .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ node_modules/
typings/
examples/
npm-debug.log
*.tgz
249 changes: 249 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@angular-redux/router",
"version": "6.3.0",
"version": "6.3.1",
"description": "Keep your Angular 2+ router state in Redux.",
"main": "./lib/es5/index.js",
"module": "./lib/esm/index.js",
Expand Down Expand Up @@ -35,7 +35,7 @@
"redux": "^3.6.0",
"rimraf": "^2.5.4",
"rxjs": "^5.0.1",
"typescript": "^2.1.0",
"typescript": "^2.4.1",
"zone.js": "^0.8.4"
},
"author": "Dag Stuan",
Expand Down
2 changes: 1 addition & 1 deletion src/reducer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { UPDATE_LOCATION } from './actions';
export const DefaultRouterState: string = '';

export interface RouterAction extends Action {
payload: string
payload?: string
}

export function routerReducer(state: string = DefaultRouterState, action: RouterAction): string {
Expand Down
4 changes: 2 additions & 2 deletions src/router.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export class NgReduxRouter {
private currentLocation: string;
private initialLocation: string;

private selectLocationFromState: (state) => string = (state) => state.router;
private selectLocationFromState: (state: any) => string = (state) => state.router;
private urlState: Observable<string>;

private urlStateSubscription: ISubscription;
Expand Down Expand Up @@ -65,7 +65,7 @@ export class NgReduxRouter {
*/
initialize(
selectLocationFromState: (state: any) => string = (state) => state.router,
urlState$: Observable<string> = undefined
urlState$: Observable<string> | undefined = undefined
) {
if (this.initialized) {
throw new Error('@angular-redux/router already initialized! If you meant to re-initialize, call destroy first.');
Expand Down
3 changes: 2 additions & 1 deletion tsconfig.es6.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
"experimentalDecorators": true,
"removeComments": false,
"declaration": true,
"lib" : ["es2015", "es2015.iterable", "dom"]
"lib" : ["es2015", "es2015.iterable", "dom"],
"skipLibCheck": true
},
"exclude": [
"lib",
Expand Down
3 changes: 2 additions & 1 deletion tsconfig.esm.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
"experimentalDecorators": true,
"removeComments": false,
"declaration": true,
"lib" : ["es2015", "es2015.iterable", "dom"]
"lib" : ["es2015", "es2015.iterable", "dom"],
"skipLibCheck": true
},
"exclude": [
"lib",
Expand Down
4 changes: 3 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@
"experimentalDecorators": true,
"removeComments": false,
"declaration": true,
"lib" : ["es2015", "es2015.iterable", "dom"]
"lib" : ["es2015", "es2015.iterable", "dom"],
"strict": true,
"skipLibCheck": true
},
"exclude": [
"lib",
Expand Down
6 changes: 3 additions & 3 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -189,9 +189,9 @@ tsickle@^0.21.0:
source-map "^0.5.6"
source-map-support "^0.4.2"

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

wrappy@1:
version "1.0.2"
Expand Down

0 comments on commit eaddf61

Please sign in to comment.