build: enable noImplicitOverride in project (#42512)

Enables the `noImplicitOverride` option to improve
overall codehealth in the repository.

PR Close #42512
This commit is contained in:
Paul Gschwendtner 2021-06-07 17:09:00 +02:00 committed by Andrew Kushnir
parent e8be045cbd
commit c7d20639c6
8 changed files with 20 additions and 2 deletions

View File

@ -678,7 +678,7 @@ jobs:
background: true background: true
# add module umd tsc compile option so the test can work # add module umd tsc compile option so the test can work
# properly in the legacy browsers # properly in the legacy browsers
- run: yarn tsc -p packages --module UMD - run: yarn tsc -p packages/tsconfig-legacy-saucelabs.json --module UMD
- run: yarn tsc -p modules --module UMD - run: yarn tsc -p modules --module UMD
- run: yarn bazel build //packages/zone.js:npm_package - run: yarn bazel build //packages/zone.js:npm_package
# Build test fixtures for a test that rely on Bazel-generated fixtures. Note that disabling # Build test fixtures for a test that rely on Bazel-generated fixtures. Note that disabling

View File

@ -1,6 +1,8 @@
{ {
"compilerOptions": { "compilerOptions": {
"strict": true, "strict": true,
"downlevelIteration": true "downlevelIteration": true,
"noImplicitAny": true,
"noImplicitOverride": true
} }
} }

View File

@ -1,6 +1,7 @@
{ {
"compilerOptions": { "compilerOptions": {
"noImplicitReturns": true, "noImplicitReturns": true,
"noImplicitOverride": true,
"noFallthroughCasesInSwitch": true, "noFallthroughCasesInSwitch": true,
"strict": true, "strict": true,
"moduleResolution": "node", "moduleResolution": "node",

View File

@ -9,6 +9,7 @@
"strictPropertyInitialization": true, "strictPropertyInitialization": true,
"outDir": "../../../dist/all/@angular/service-worker/cli-custom", "outDir": "../../../dist/all/@angular/service-worker/cli-custom",
"noImplicitAny": true, "noImplicitAny": true,
"noImplicitOverride": true,
"noFallthroughCasesInSwitch": true, "noFallthroughCasesInSwitch": true,
"rootDir": ".", "rootDir": ".",
"paths": { "paths": {

View File

@ -8,6 +8,7 @@
"declaration": true, "declaration": true,
"stripInternal": true, "stripInternal": true,
"noImplicitAny": true, "noImplicitAny": true,
"noImplicitOverride": true,
"strictNullChecks": true, "strictNullChecks": true,
"strict": true, "strict": true,
"strictPropertyInitialization": true, "strictPropertyInitialization": true,

View File

@ -0,0 +1,11 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
// The project uses Bazel for TypeScript compilation. Unlike with Bazel, we build all
// sources as part of a single TypeScript compilation. This results in `@internal`
// declarations not being omitted between the logical as defined per the Bazel targets.
// This can cause issues where the `override` keyword is needed for the legacy TS
// compilation, but not within Bazel where the overridden member has `@internal`.
"noImplicitOverride": false,
}
}

View File

@ -14,6 +14,7 @@
"strictPropertyInitialization": true, "strictPropertyInitialization": true,
"outDir": "../dist/all/@angular", "outDir": "../dist/all/@angular",
"noImplicitAny": true, "noImplicitAny": true,
"noImplicitOverride": true,
"noFallthroughCasesInSwitch": true, "noFallthroughCasesInSwitch": true,
"paths": { "paths": {
"selenium-webdriver": ["./node_modules/@types/selenium-webdriver/index.d.ts"], "selenium-webdriver": ["./node_modules/@types/selenium-webdriver/index.d.ts"],

View File

@ -9,6 +9,7 @@
"noEmitOnError": false, "noEmitOnError": false,
"stripInternal": false, "stripInternal": false,
"strict": true, "strict": true,
"noImplicitOverride": true,
"lib": [ "lib": [
"es5", "es5",
"dom", "dom",