Skip to content

build: enable all ngtsc strictness flags #18339

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 30, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ <h4>Basic mat-select with initial value</h4>
<h4>Basic native select with initial value</h4>
<mat-form-field>
<mat-label>Favorite Car</mat-label>
<select matNativeControl (change)="selectedCar = $event.target.value">
<select matNativeControl (change)="selectCar($event)">
<option value=""></option>
<option *ngFor="let option of cars" [value]="option.value"
[selected]="selectedCar === option.value">{{ option.viewValue }}</option>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,8 @@ export class SelectInitialValueExample {
];
selectedFood = this.foods[2].value;
selectedCar = this.cars[0].value;

selectCar(event: Event) {
this.selectedCar = (event.target as HTMLSelectElement).value;
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<mat-form-field>
<mat-label>Filter</mat-label>
<input matInput (keyup)="applyFilter($event.target.value)" placeholder="Ex. ium">
<input matInput (keyup)="applyFilter($event)" placeholder="Ex. ium">
</mat-form-field>

<table mat-table [dataSource]="dataSource" class="mat-elevation-z8">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ export class TableFilteringExample {
displayedColumns: string[] = ['position', 'name', 'weight', 'symbol'];
dataSource = new MatTableDataSource(ELEMENT_DATA);

applyFilter(filterValue: string) {
applyFilter(event: Event) {
const filterValue = (event.target as HTMLInputElement).value;
this.dataSource.filter = filterValue.trim().toLowerCase();
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<mat-form-field>
<mat-label>Filter</mat-label>
<input matInput (keyup)="applyFilter($event.target.value)" placeholder="Ex. Mia">
<input matInput (keyup)="applyFilter($event)" placeholder="Ex. Mia">
</mat-form-field>

<div class="mat-elevation-z8">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@ export class TableOverviewExample implements OnInit {
this.dataSource.sort = this.sort;
}

applyFilter(filterValue: string) {
applyFilter(event: Event) {
const filterValue = (event.target as HTMLInputElement).value;
this.dataSource.filter = filterValue.trim().toLowerCase();

if (this.dataSource.paginator) {
Expand Down
2 changes: 1 addition & 1 deletion src/dev-app/select/select-demo.html
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,7 @@ <h4>Error message with errorStateMatcher</h4>
<mat-card-content>
<mat-form-field>
<mat-label>Starter pokemon</mat-label>
<mat-select (change)="latestChangeEvent = $event">
<mat-select (selectionChange)="latestChangeEvent = $event">
<mat-option *ngFor="let creature of pokemon" [value]="creature.value">{{ creature.viewValue }}</mat-option>
</mat-select>
</mat-form-field>
Expand Down
2 changes: 1 addition & 1 deletion src/e2e-app/radio/radio-e2e.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<section>
<mat-radio-group [disabled]="isGroupDisabled"
[(value)]="groupValue"
[value]="groupValue"
id="test-group" aria-label="Select a Pokemon">

<mat-radio-button value="fire" id="fire">Charmander</mat-radio-button>
Expand Down
6 changes: 2 additions & 4 deletions tools/bazel/postinstall-patches.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const fs = require('fs');
* Version of the post install patch. Needs to be incremented when patches
* have been added or removed.
*/
const PATCH_VERSION = 2;
const PATCH_VERSION = 3;

/** Path to the project directory. */
const projectDir = path.join(__dirname, '../..');
Expand Down Expand Up @@ -118,9 +118,7 @@ searchAndReplace(`[formatProperty + "_ivy_ngcc"]`, '[formatProperty]',

// Workaround for https://github.com/angular/angular/issues/33452:
searchAndReplace(/angular_compiler_options = {/, `$&
"strictTemplates": True,
"strictDomLocalRefTypes ": False,
"strictDomEventTypes": False,`, 'node_modules/@angular/bazel/src/ng_module.bzl');
"strictTemplates": True,`, 'node_modules/@angular/bazel/src/ng_module.bzl');

// More info in https://github.com/angular/angular/pull/33786
shelljs.rm('-rf', [
Expand Down