Skip to content

Commit d132b0d

Browse files
committed
build: enable strict property initialization for entire repo
Enables strict property initialization for the whole repo and fixes a few failures that weren't caught earlier.
1 parent a9be1aa commit d132b0d

15 files changed

Lines changed: 9 additions & 14 deletions

File tree

docs/src/assets/stackblitz/tsconfig.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
"noUnusedLocals": false,
2020
"useDefineForClassFields": false,
2121
"strictNullChecks": true,
22+
"strictPropertyInitialization": true,
2223
"noImplicitReturns": true,
2324
"strictFunctionTypes": true,
2425
"noImplicitOverride": true,

src/aria/tree/tree-item.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ export class TreeItem<V> extends DeferredContentAware implements OnInit, OnDestr
119119
);
120120

121121
/** The UI pattern for this item. */
122-
_pattern: TreeItemPattern<V>;
122+
_pattern!: TreeItemPattern<V>;
123123

124124
constructor() {
125125
super();

src/bazel-tsconfig-build.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
"noUnusedParameters": false,
1212
"noUnusedLocals": false,
1313
"strictNullChecks": true,
14+
"strictPropertyInitialization": true,
1415
"noPropertyAccessFromIndexSignature": true,
1516
"noImplicitReturns": true,
1617
"strictFunctionTypes": true,

src/cdk-experimental/tsconfig.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
"compilerOptions": {
55
"rootDir": "..",
66
"baseUrl": ".",
7-
"strictPropertyInitialization": true,
87
"paths": {
98
"@angular/cdk/*": ["../cdk/*"],
109
"@angular/cdk-experimental/*": ["../cdk-experimental/*"]

src/cdk/schematics/tsconfig.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
"moduleResolution": "node",
77
"rootDir": ".",
88
"strictNullChecks": true,
9+
"strictPropertyInitialization": true,
910
"noPropertyAccessFromIndexSignature": true,
1011
"strict": true,
1112
"useUnknownInCatchVariables": true,

src/cdk/tsconfig.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
"compilerOptions": {
55
"rootDir": "..",
66
"baseUrl": ".",
7-
"strictPropertyInitialization": true,
87
"paths": {
98
"@angular/cdk/*": ["./*"]
109
}

src/components-examples/tsconfig.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
"compilerOptions": {
55
"rootDir": "..",
66
"baseUrl": ".",
7-
"strictPropertyInitialization": true,
87
"paths": {
98
"@angular/aria/*": ["../aria/*"],
109
"@angular/cdk/*": ["../cdk/*"],

src/dev-app/tsconfig.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
// Needed for Moment.js since it doesn't have a default export.
66
"rootDir": "..",
77
"baseUrl": ".",
8-
"strictPropertyInitialization": true,
98
"paths": {
109
"@angular/aria": ["../aria"],
1110
"@angular/aria/*": ["../aria/*"],

src/google-maps/tsconfig.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@
55
"rootDir": "..",
66
"baseUrl": ".",
77
"paths": {},
8-
"types": ["jasmine", "google.maps"],
9-
"strictPropertyInitialization": true
8+
"types": ["jasmine", "google.maps"]
109
},
1110
"include": ["./**/*.ts", "../dev-mode-types.d.ts"]
1211
}

src/material-experimental/tsconfig.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
"compilerOptions": {
55
"rootDir": "..",
66
"baseUrl": ".",
7-
"strictPropertyInitialization": true,
87
"paths": {
98
"@angular/cdk/*": ["../cdk/*"],
109
"@angular/material/*": ["../material/*"],

0 commit comments

Comments
 (0)