-
Notifications
You must be signed in to change notification settings - Fork 25.2k
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
feat(core): support TypeScript 4.9 #48005
Conversation
34baaab
to
98d9d6f
Compare
@@ -275,6 +278,78 @@ export const getDecorators: (node: ts.Node) => readonly ts.Decorator[] | undefin | |||
export const getModifiers: (node: ts.Node) => readonly ts.Modifier[] | undefined = | |||
IS_AFTER_TS_48 ? (ts as any).getModifiers : node => node.modifiers; | |||
|
|||
/** Type of `ts.factory.CreateParameterDeclaration` in TS 4.9+. */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All these backwards-compatible versions are here to avoid deprecation warnings, rather than compilation errors like during the 4.8 update.
39acefc
to
0483be5
Compare
* TODO(crisbeto): this is a backwards-compatibility layer for versions of TypeScript less than 4.9. | ||
* We should remove it once we have dropped support for the older versions. | ||
*/ | ||
function createImportDeclaration( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Kind of annoying to have to duplicate this function, but I didn't want the schematics code to do deep imports into the compiler.
packages/compiler-cli/ngcc/test/execution/cluster/worker_spec.ts
Outdated
Show resolved
Hide resolved
packages/compiler-cli/src/ngtsc/ts_compatibility/src/ts_cross_version_utils.ts
Show resolved
Hide resolved
packages/compiler-cli/src/ngtsc/ts_compatibility/src/ts_cross_version_utils.ts
Show resolved
Hide resolved
@@ -98,7 +98,7 @@ | |||
"@types/jasmine-ajax": "^3.3.1", | |||
"@types/jasminewd2": "^2.0.8", | |||
"@types/multimatch": "^4.0.0", | |||
"@types/node": "^14.15.0", | |||
"@types/node": "^16.11.7", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just noting here that we do still support Node 14, so we'll have to be careful with using the Node 16 types in the repo.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
Updates to TypeScript 4.9 and resolves some of the errors and deprecation warnings that showed up as a result.
Pushed another change to bump to the 4.9 stable version. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
This PR was merged into the repository by commit dd42974. |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Updates to TypeScript 4.9 and resolves some of the errors and deprecation warnings that showed up as a result. PR Close angular#48005
Updates to TypeScript 4.9 and resolves some of the errors and deprecation warnings that showed up as a result.