We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
inputing:
function xhr(url, callback) { var xhr = new XMLHttpRequest(); xhr.onreadystatechange = function () { if (this.readyState == 4 && this.status == 200) callback(JSON.parse(this.responseText)); }; xhr.open('GET', url, true); xhr.send(); }
results in:
class xhr { constructor(url, callback) { const xhr = new XMLHttpRequest(); xhr.open('GET', url, true); xhr.send(); } static onreadystatechange() { if (this.readyState == 4 && this.status == 200) callback(JSON.parse(this.responseText)); } }
because the function has the same name as a variable within the function.
The text was updated successfully, but these errors were encountered:
Thanks for reporting. That's definitely wrong result. The xhr() function should not have been transformed into class at all.
xhr()
This again confirms that the current class transform implementation is fundamentally flawed.
Sorry, something went wrong.
No branches or pull requests
inputing:
results in:
because the function has the same name as a variable within the function.
The text was updated successfully, but these errors were encountered: