forked from angular/angular
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adds support for TypeScript 4.4. High-level overview of the changes made in this PR: * Bumps the various packages to `[email protected]` and `[email protected]`. * The error object in `catch` clauses is now typed as `unknown` which caused a lot of compilation errors. I've resolved it by casting either to `Error` or `any` depending on the use case. Note that I've been using `as` casts, rather than typing the object directly, because TS only allows for `any` or `unknown` to be used in the `catch` clause parameters. * TS now passes in a third argument to the `__spreadArray` call inside child class constructors. I had to update a couple of places in the runtime and ngcc to be able to pick up the calls correctly. * TS now generates code like `(0, foo)(arg1, arg2)` for imported function calls. I had to update a few of our tests to account for it. See microsoft/TypeScript#44624. * Our `ngtsc` test setup calls the private `matchFiles` function from TS. I had to update our usage, because a new parameter was added. * There was one place where we were setting the readonly `hasTrailingComma` property. I updated the usage to pass in the value when constructing the object instead. * Some browser types were updated which meant that I had to resolve some trivial type errors. * The downlevel decorators tranform was running into an issue where the Closure synthetic comments were being emitted twice. I've worked around it by recreating the class declaration node instead of cloning it.
- Loading branch information
Showing
115 changed files
with
400 additions
and
249 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
/** | ||
* @license | ||
* Copyright Google LLC All Rights Reserved. | ||
* | ||
* Use of this source code is governed by an MIT-style license that can be | ||
* found in the LICENSE file at https://angular.io/license | ||
*/ | ||
|
||
|
||
|
||
import * as animations from '@angular/animations'; | ||
import * as animationsBrowser from '@angular/animations/browser'; | ||
import * as animationsBrowserTesting from '@angular/animations/browser/testing'; | ||
import * as common from '@angular/common'; | ||
import * as commonHttp from '@angular/common/http'; | ||
import * as commonTesting from '@angular/common/testing'; | ||
import * as commonHttpTesting from '@angular/common/testing'; | ||
import * as compiler from '@angular/compiler'; | ||
import * as compilerTesting from '@angular/compiler/testing'; | ||
import * as core from '@angular/core'; | ||
import * as coreTesting from '@angular/core/testing'; | ||
import * as elements from '@angular/elements'; | ||
import * as forms from '@angular/forms'; | ||
import * as platformBrowser from '@angular/platform-browser'; | ||
import * as platformBrowserDynamic from '@angular/platform-browser-dynamic'; | ||
import * as platformBrowserDynamicTesting from '@angular/platform-browser-dynamic/testing'; | ||
import * as platformBrowserAnimations from '@angular/platform-browser/animations'; | ||
import * as platformBrowserTesting from '@angular/platform-browser/testing'; | ||
import * as platformServer from '@angular/platform-server'; | ||
import * as platformServerInit from '@angular/platform-server/init'; | ||
import * as platformServerTesting from '@angular/platform-server/testing'; | ||
import * as router from '@angular/router'; | ||
import * as routerTesting from '@angular/router/testing'; | ||
import * as routerUpgrade from '@angular/router/upgrade'; | ||
import * as serviceWorker from '@angular/service-worker'; | ||
import * as upgrade from '@angular/upgrade'; | ||
import * as upgradeStatic from '@angular/upgrade/static'; | ||
import * as upgradeTesting from '@angular/upgrade/static/testing'; | ||
|
||
export default { | ||
animations, | ||
animationsBrowser, | ||
animationsBrowserTesting, | ||
common, | ||
commonTesting, | ||
commonHttp, | ||
commonHttpTesting, | ||
compiler, | ||
compilerTesting, | ||
core, | ||
coreTesting, | ||
elements, | ||
forms, | ||
platformBrowser, | ||
platformBrowserTesting, | ||
platformBrowserDynamic, | ||
platformBrowserDynamicTesting, | ||
platformBrowserAnimations, | ||
platformServer, | ||
platformServerInit, | ||
platformServerTesting, | ||
router, | ||
routerTesting, | ||
routerUpgrade, | ||
serviceWorker, | ||
upgrade, | ||
upgradeStatic, | ||
upgradeTesting, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
{ | ||
"name": "angular-integration", | ||
"description": "Assert that users with TypeScript 4.4 can type-check an Angular application", | ||
"version": "0.0.0", | ||
"license": "MIT", | ||
"dependencies": { | ||
"@angular/animations": "file:../../dist/packages-dist/animations", | ||
"@angular/common": "file:../../dist/packages-dist/common", | ||
"@angular/compiler": "file:../../dist/packages-dist/compiler", | ||
"@angular/compiler-cli": "file:../../dist/packages-dist/compiler-cli", | ||
"@angular/core": "file:../../dist/packages-dist/core", | ||
"@angular/elements": "file:../../dist/packages-dist/elements", | ||
"@angular/forms": "file:../../dist/packages-dist/forms", | ||
"@angular/platform-browser": "file:../../dist/packages-dist/platform-browser", | ||
"@angular/platform-browser-dynamic": "file:../../dist/packages-dist/platform-browser-dynamic", | ||
"@angular/platform-server": "file:../../dist/packages-dist/platform-server", | ||
"@angular/router": "file:../../dist/packages-dist/router", | ||
"@angular/service-worker": "file:../../dist/packages-dist/service-worker", | ||
"@angular/upgrade": "file:../../dist/packages-dist/upgrade", | ||
"@types/jasmine": "file:../../node_modules/@types/jasmine", | ||
"rxjs": "file:../../node_modules/rxjs", | ||
"typescript": "4.4.2", | ||
"zone.js": "file:../../dist/zone.js-dist/archive/zone.js.tgz" | ||
}, | ||
"scripts": { | ||
"test": "tsc" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
{ | ||
"compilerOptions": { | ||
"forceConsistentCasingInFileNames": true, | ||
"strict": true, | ||
"noImplicitReturns": true, | ||
"noFallthroughCasesInSwitch": true, | ||
"experimentalDecorators": true, | ||
"module": "commonjs", | ||
"moduleResolution": "node", | ||
"outDir": "./dist/out-tsc", | ||
"rootDir": ".", | ||
"target": "es5", | ||
"lib": [ | ||
"es5", | ||
"dom", | ||
"es2015.collection", | ||
"es2015.iterable", | ||
"es2015.promise" | ||
], | ||
"types": [], | ||
}, | ||
"files": [ | ||
"include-all.ts", | ||
"node_modules/@types/jasmine/index.d.ts" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.