-
-
Notifications
You must be signed in to change notification settings - Fork 85
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
Add type transformation #32
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.
Awesome!! Tested locally and it works well. I had an idea for some fancy unification; lmk if you can get that approach working / if it seems like a good direction
Got this working with your changes. Pulling out the type node isn't quite as clean as you might hope, but all the pieces seem to fit together nicely. |
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.
This looks awesome @brxck. I left one more nit to make things slightly clearer but then it's good to go. I can pull it down to mess around with tomorrow my time then I'll ship it
Ok I pulled this one locally and it works pretty well. One that I noticed tho: export type DecorationMap = {
[k in SymbolColor]?: vscode.TextEditorDecorationType;
}; If cursor is inside |
Apparently the type of this node is different: |
* Added range modifiers till and tween * renamed til two until
This should allow referencing type declarations and annotations in Typescript, as I brought up in #24
The transformation can be used on variable declarations, parameters, functions, and properties within type declarations.
This doesn't cover generics, i.e. type parameters or arguments. I started on them, but they complicate things a bit more. Personally I don't think I'm going to miss supporting them at least for now.
Any tweaks or feedback welcome 👍🏼
Closes #24