Skip to content

Commit

Permalink
fix: typings entry point and failing definitions (angular-redux#36)
Browse files Browse the repository at this point in the history
Also adds stricter ngc build rules to ensure correct metadata emit.
  • Loading branch information
smithad15 committed Jul 9, 2018
1 parent 9eb99c0 commit ae0373d
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
1 change: 1 addition & 0 deletions packages/form/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@
"prepublish": "npm run build"
},
"main": "dist/source/index.js",
"typings": "dist/source/index.d.ts",
"repository": "https://github.com/angular-redux/form",
"license": "MIT"
}
4 changes: 2 additions & 2 deletions packages/form/source/connect-array.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,11 +111,11 @@ export class ConnectArray extends ControlContainer implements OnInit {
return controlPath(this.key, this.parent);
}

get validator(): ValidatorFn {
get validator(): ValidatorFn | null {
return Validators.compose(this.rawValidators);
}

get asyncValidator(): AsyncValidatorFn {
get asyncValidator(): AsyncValidatorFn | null {
return Validators.composeAsync(this.rawAsyncValidators);
}

Expand Down
2 changes: 1 addition & 1 deletion packages/form/source/shims.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {
} from '@angular/forms';

export function controlPath(name: string, parent: ControlContainer): string[] {
return [...parent.path, name];
return [...(parent.path || []), name];
}

export function selectValueAccessor(
Expand Down
5 changes: 4 additions & 1 deletion packages/form/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,10 @@
"useBabel": true,
"useCache": false
},
"angularCompilerOptions": {},
"angularCompilerOptions": {
"strictMetadataEmit": true,
"skipTemplateCodegen": true
},
"exclude": [
"node_modules",
"dist",
Expand Down

0 comments on commit ae0373d

Please # to comment.