-
Notifications
You must be signed in to change notification settings - Fork 27.1k
Support TypeScript 4.1 #39571
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
Closed
Closed
Support TypeScript 4.1 #39571
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
e9d1ded
feat(compiler-cli): add support for using TypeScript 4.1
clydin 310a054
build: support building with TypeScript 4.1
clydin a0cb33c
fixup! build: support building with TypeScript 4.1
clydin 6de5ef0
fixup! build: support building with TypeScript 4.1
JoostK de66744
fixup! build: support building with TypeScript 4.1
JoostK ff873ff
fixup! build: support building with TypeScript 4.1
JoostK db14181
fixup! build: support building with TypeScript 4.1
clydin a099ec7
test(compiler-cli): add TypeScript 4.1 typings integration test
clydin 72ae869
fixup! build: support building with TypeScript 4.1
clydin File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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,67 @@ | ||
| /** | ||
| * @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'; | ||
clydin marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| import * as coreTesting from '@angular/core/testing'; | ||
| import * as elements from '@angular/elements'; | ||
| import * as forms from '@angular/forms'; | ||
clydin marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| 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 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, | ||
| platformServerTesting, | ||
| router, | ||
| routerTesting, | ||
| routerUpgrade, | ||
| serviceWorker, | ||
| upgrade, | ||
| upgradeStatic, | ||
| upgradeTesting, | ||
| }; | ||
This file contains hidden or 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.1 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", | ||
clydin marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| "@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.1.2", | ||
| "zone.js": "file:../../dist/zone.js-dist/archive/zone.js.tgz" | ||
| }, | ||
| "scripts": { | ||
| "test": "tsc" | ||
| } | ||
| } | ||
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 |
|---|---|---|
|
|
@@ -78,7 +78,7 @@ export function findNamespaceOfIdentifier(id: ts.Identifier): ts.Identifier|null | |
| export function findRequireCallReference(id: ts.Identifier, checker: ts.TypeChecker): RequireCall| | ||
| null { | ||
| const symbol = checker.getSymbolAtLocation(id) || null; | ||
| const declaration = symbol && symbol.valueDeclaration; | ||
| const declaration = symbol?.valueDeclaration ?? symbol?.declarations?.[0]; | ||
|
||
| const initializer = | ||
| declaration && ts.isVariableDeclaration(declaration) && declaration.initializer || null; | ||
| return initializer && isRequireCall(initializer) ? initializer : null; | ||
|
|
||
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.