Split heritage clause expression and type nodes - #4797
Draft
jakebailey wants to merge 1 commit into
Draft
Conversation
Member
Author
|
@typescript-bot perf test this faster |
|
I guess this reinforces that there really are two cases here, which I hadn't really thought about previously, seems like a good idea! |
Gerrit0
reviewed
Jul 30, 2026
| assert.strictEqual(interfaceDecl.heritageClauses?.[0].types[0].kind, SyntaxKind.TypeReference); | ||
| } | ||
| finally { | ||
| api.close(); |
There was a problem hiding this comment.
This showing up all over in the unit tests makes me wonder if API ought to have a Symbol.dispose method so the tests can do using api = spawnAPI(...) and avoid this
|
@jakebailey Here they are:
tscComparison Report - baseline..pr
System info unknown
Hosts
Scenarios
Developer Information: |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
@Gerrit0 mentioned on Discord that heritage clauses are expressions with type args, but that those are not marked as type nodes.
While we could probably restore the brand, that got me thinking whether or not we could actually just have two different nodes here depending on whether or not it's type space or not.
I threw copilot at it to see if it could make the change and how bad it'd be.
I actually don't think that this is that bad at all,
and does (IIRC) resolve a previous conversation we had about how it was weird to make the emitter handle this?(no, that was something else, the use of ExprWithTypeArgs for hovers)