-
Notifications
You must be signed in to change notification settings - Fork 425
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
Fix for static interfaces with non-static methods #1
Conversation
Pt.printl "}" | ||
Pt.printl "" | ||
Pt.printl "declare var %s: {" i.Name | ||
Pt.increaseIndent() |
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.
You may want to consider using a helper function like
let indentFor dump =
Pt.increaseIndent()
dump()
Pt.decreaseIndent()
Also, "dump" is such an unappealing word. Maybe emit would be better if you're up to making that change in the future 😄
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.
Then how should I use indentFor
? It seems then I need to wrap up the arbitrary print statements to a function then pass it to the indentFor
everytime, which might be verbose as well?
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.
It prevents you from forgetting to decreaseIndent each time. It's only a suggestion.
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.
Right. Maybe something like the with
keyword or using
in C#. I'll look into it
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.
BTW the word Dump
is because it was called so in the old script :) Emit
does sound better
Fix for static interfaces with non-static methods
…overloads Update addedTypes.json
This is for microsoft/TypeScript#4684