Skip to content

Commit 11f9228

Browse files
authored
build: enable stricter checking of inputs and outputs (#31638)
Enables flags for stricter type checking of inputs and outputs, as well as a flag that will prevent us from declaring private/protected inputs.
1 parent 3a308a8 commit 11f9228

File tree

6 files changed

+18
-3
lines changed

6 files changed

+18
-3
lines changed

docs/tsconfig.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,9 @@
3232
"strictInjectionParameters": true,
3333
"strictInputAccessModifiers": true,
3434
"strictTemplates": true,
35+
"strictInputTypes": true,
36+
"strictOutputEventTypes": true,
37+
"strictDomEventTypes": true,
3538
"typeCheckHostBindings": true
3639
}
3740
}

src/bazel-tsconfig-build.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,10 @@
5151
"angularCompilerOptions": {
5252
"strictTemplates": true,
5353
"typeCheckHostBindings": true,
54+
"strictInputAccessModifiers": true,
55+
"strictInputTypes": true,
56+
"strictOutputEventTypes": true,
57+
"strictDomEventTypes": true,
5458
"extendedDiagnostics": {
5559
"defaultCategory": "error"
5660
}

src/cdk-experimental/radio-group/radio-group.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ export class CdkRadioButton<V> {
186186
protected id = computed(() => this._generatedId);
187187

188188
/** The value associated with the radio button. */
189-
protected value = input.required<V>();
189+
readonly value = input.required<V>();
190190

191191
/** The parent RadioGroup UIPattern. */
192192
protected group = computed(() => this._cdkRadioGroup.pattern);

src/material/chips/chip-action.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ export class MatChipAction {
7777
* Private API to allow focusing this chip when it is disabled.
7878
*/
7979
@Input()
80-
private _allowFocusWhenDisabled = false;
80+
_allowFocusWhenDisabled = false;
8181

8282
/**
8383
* Determine the value of the disabled attribute for this chip action.

src/tsconfig-legacy.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,10 @@
3030
// not find an associated module for test components and error out.
3131
"compileNonExportedClasses": false,
3232
"typeCheckHostBindings": true,
33-
"strictTemplates": true
33+
"strictTemplates": true,
34+
"strictInputAccessModifiers": true,
35+
"strictInputTypes": true,
36+
"strictOutputEventTypes": true,
37+
"strictDomEventTypes": true
3438
}
3539
}

tsconfig.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,10 @@
4444
"angularCompilerOptions": {
4545
"strictTemplates": true,
4646
"typeCheckHostBindings": true,
47+
"strictInputAccessModifiers": true,
48+
"strictInputTypes": true,
49+
"strictOutputEventTypes": true,
50+
"strictDomEventTypes": true,
4751
"extendedDiagnostics": {
4852
"defaultCategory": "error"
4953
}

0 commit comments

Comments
 (0)