Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
Support TypeScript 4.1 #39571
Support TypeScript 4.1 #39571
Conversation
2b39f9f
to
a40cfd7
This comment has been hidden.
This comment has been hidden.
This comment has been hidden.
This comment has been hidden.
| @@ -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]; | |||
JoostK
Nov 6, 2020
Member
This change seems to have been due to microsoft/TypeScript#39770, where the variable declaration is now treated as an alias declaration which no longer has a value declaration.
|
Can we add an integration tests like https://github.com/angular/angular/tree/master/integration/typings_test_ts40 |
|
LGTM for From a quick look, I would expect the Reviewed-for: dev-infra, docs-infra, fw-upgrade |
| setTempProgramHandlerForTest(program => { | ||
| structureReuse = tsStructureIsReused(program); | ||
| }); | ||
| compile(); |
gkalpak
Nov 20, 2020
Member
Wouldn't it be safer to call resetTempProgramHandlerForTest() right after compile()?
JoostK
Nov 20, 2020
Member
That would work, but we'd have to be sure that it is exception safe so the afterEach is still nice to have IMO (or wrap it in try-finally)
This change enables projects to be built with TypeScript 4.1. Support for TypeScript 4.0 is also retained.
TypeScript 4.1 is now used to build and test within the repository.
This change adds a typings test identical to the TypeScript 4.0 test but using TypeScript 4.1 instead.
This change updates the framework to support TypeScript 4.1.