Closed ota-meshi closed 1 year ago
Happy to see this is in progress! I upgraded to 3.3 this morning and tried to use generics and started immediately hitting no-def errors.
Thank you for your effort, can't wait to have this working and update to 3.3!
This PR adds support for generic attributes.
The value of the generic attribute is parsed as a new node
VGenericExpression
.This change adds a new trick for resolving typescript type information.
When the generic attribute is specified, before passing the code to the script parser, we add virtual code to parse the type information specified by the generic attribute, and then remove it from the AST and scope manager.
e.g.
input:
virtual code:
input:
virtual code:
input:
virtual code: