build: re-enable template type-checking for various targets across the repo (#34144)

Various targets have their template type-checking disabled in the past.

There is no reason for this any more.

The only target that was tricky was packages/examples/core:core_examples
which was quite broken and I had to fix it up.

Template typechecking is still disabled under blaze, see FW-1753 for more
info.

PR Close #34144
This commit is contained in:
Igor Minar
2019-11-29 01:54:33 -08:00
committed by Miško Hevery
parent d8792b3c36
commit 1421eff382
38 changed files with 14 additions and 79 deletions

View File

@ -9,8 +9,6 @@ ng_module(
exclude = ["**/*_spec.ts"],
),
generate_ve_shims = True,
# TODO: FW-1004 Type checking is currently not complete.
type_check = False,
deps = [
"//packages/common",
"//packages/core",

View File

@ -12,11 +12,10 @@ ng_module(
],
),
generate_ve_shims = True,
# TODO: FW-1004 Type checking is currently not complete.
type_check = False,
deps = [
"//packages/animations",
"//packages/core",
"//packages/forms",
"//packages/platform-browser",
"//packages/platform-browser-dynamic",
"//packages/platform-browser/animations",

View File

@ -6,7 +6,8 @@
* found in the LICENSE file at https://angular.io/license
*/
/* tslint:disable:no-console */
import {ChangeDetectionStrategy, ChangeDetectorRef, Component, Directive} from '@angular/core';
import {ChangeDetectionStrategy, ChangeDetectorRef, Component, Input, NgModule} from '@angular/core';
import {FormsModule} from '@angular/forms';
// #docregion mark-for-check
@ -42,7 +43,7 @@ class DataListProvider {
`,
})
class GiantList {
constructor(private ref: ChangeDetectorRef, private dataProvider: DataListProvider) {
constructor(private ref: ChangeDetectorRef, public dataProvider: DataListProvider) {
ref.detach();
setInterval(() => { this.ref.detectChanges(); }, 5000);
}
@ -70,8 +71,9 @@ class DataProvider {
@Component({selector: 'live-data', inputs: ['live'], template: 'Data: {{dataProvider.data}}'})
class LiveData {
constructor(private ref: ChangeDetectorRef, private dataProvider: DataProvider) {}
constructor(private ref: ChangeDetectorRef, public dataProvider: DataProvider) {}
@Input()
set live(value: boolean) {
if (value) {
this.ref.reattach();
@ -94,3 +96,8 @@ class App1 {
live = true;
}
// #enddocregion reattach
@NgModule({declarations: [AppComponent, GiantList, App, LiveData, App1], imports: [FormsModule]})
class CoreExamplesModule {
}

View File

@ -9,8 +9,6 @@ ng_module(
exclude = ["**/*_spec.ts"],
),
generate_ve_shims = True,
# TODO: FW-1004 Type checking is currently not complete.
type_check = False,
deps = [
"//packages/core",
"//packages/forms",

View File

@ -8,8 +8,6 @@ ng_module(
["**/*.ts"],
),
generate_ve_shims = True,
# TODO: FW-1004 Type checking is currently not complete.
type_check = False,
deps = [
"//packages/core",
"//packages/platform-browser",

View File

@ -9,8 +9,6 @@ ng_module(
exclude = ["**/*_spec.ts"],
),
generate_ve_shims = True,
# TODO: FW-1004 Type checking is currently not complete.
type_check = False,
deps = [
"//packages/core",
"//packages/platform-browser",

View File

@ -9,8 +9,6 @@ ng_module(
exclude = ["**/*_spec.ts"],
),
generate_ve_shims = True,
# TODO: FW-1004 Type checking is currently not complete.
type_check = False,
deps = [
"//packages/core",
"//packages/platform-browser",

View File

@ -12,8 +12,6 @@ def create_upgrade_example_targets(name, srcs, e2e_srcs, entry_module, assets =
name = "%s_sources" % name,
srcs = srcs,
generate_ve_shims = True,
# TODO: FW-1004 Type checking is currently not complete.
type_check = False,
deps = [
"@npm//@types/angular",
"@npm//@types/jasmine",