-
Notifications
You must be signed in to change notification settings - Fork 1.8k
JS: Add support for TypeScript 4.4 #6587
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
Conversation
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.
Excellent work! Although as you say the representation of static initializers is indeed not very nice.
Couldn't we represent the static initializers using MemberDefinition
? I mean that's literally defined as "a member definition in a class body". How about we add a new subclass of MemberDefinition
, set the name to null
and the value
to the BlockStatement
(and relaxing the bound on T
).
I've done that. I also need to do an update script, I'll do that later today. |
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.
Thanks! Looks much better now 👍
@@ -155,6 +156,8 @@ | |||
import com.semmle.util.collections.CollectionUtil; | |||
import com.semmle.util.data.IntList; | |||
|
|||
import jdk.internal.org.objectweb.asm.commons.StaticInitMerger; |
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.
Stray import
I added an upgrade script. I've rebased on |
These are the failures from the CI:
I'm not sure why, because it works just fine on my machine. Edit: I'm even more confused. |
Hm, it also works on my machine. 😕 |
I've pulled the JS changes into this PR. Might make it easier to debug. |
Co-authored-by: Asger F <asgerf@github.com>
Co-authored-by: Asger F <asgerf@github.com>
… type on `MemberDefinition`
ping @asgerf The tests are working. I still have no idea why that only failed in the CI. |
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.
Glad we got that sorted! 👍
Adds support for TypeScript 4.4.
Adding support for TypeScript 4.4 was completely straight-forward, except for static initializer blocks.
It looks like static initializer blocks is making it's way into ECMAScript. So we should look into that later.
(I'll check it out after this PR is merged).
The
List<Node> body;
type inClassBody
is not the prettiest type.But we need an ordered list that contains a mix of member-declarations and block-statements, so I think the only way to do better is to create an entirely new interface.
I haven't added getters for the new index signatures, because the available API still only exposes string/number index signatures.
No evaluation planned.