Skip to content

Commit 7df3442

Browse files
authored
fix: typings entry point and failing definitions (#36)
Also adds stricter ngc build rules to ensure correct metadata emit.
1 parent 1b7a509 commit 7df3442

File tree

4 files changed

+8
-4
lines changed

4 files changed

+8
-4
lines changed

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@
6969
"prepublish": "npm run build"
7070
},
7171
"main": "dist/source/index.js",
72+
"typings": "dist/source/index.d.ts",
7273
"repository": "https://github.com/angular-redux/form",
7374
"license": "MIT"
7475
}

source/connect-array.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,11 +111,11 @@ export class ConnectArray extends ControlContainer implements OnInit {
111111
return controlPath(this.key, this.parent);
112112
}
113113

114-
get validator(): ValidatorFn {
114+
get validator(): ValidatorFn | null {
115115
return Validators.compose(this.rawValidators);
116116
}
117117

118-
get asyncValidator(): AsyncValidatorFn {
118+
get asyncValidator(): AsyncValidatorFn | null {
119119
return Validators.composeAsync(this.rawAsyncValidators);
120120
}
121121

source/shims.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import {
1010
} from '@angular/forms';
1111

1212
export function controlPath(name: string, parent: ControlContainer): string[] {
13-
return [...parent.path, name];
13+
return [...(parent.path || []), name];
1414
}
1515

1616
export function selectValueAccessor(

tsconfig.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,10 @@
2626
"useBabel": true,
2727
"useCache": false
2828
},
29-
"angularCompilerOptions": {},
29+
"angularCompilerOptions": {
30+
"strictMetadataEmit": true,
31+
"skipTemplateCodegen": true
32+
},
3033
"exclude": [
3134
"node_modules",
3235
"dist",

0 commit comments

Comments
 (0)