Skip to content
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

🚀 Transformer for removing AMP devAssert, working on existing known cases #27821

Conversation

kristoferbaxter
Copy link
Contributor

This WIP plugin is ready for review, marked as a draft since it's not yet tied into the development process.

if (innerCallExpression) {
const evalutedDevAssert = evaluateDevAssert(innerCallExpression);
if (!evalutedDevAssert.confident) {
return;
Copy link
Member

@erwinmombay erwinmombay Apr 17, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we return a boolean here? return false

*/

/**
* Is a MemberExpression "thenable", `foo().then(() => {});`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't this just asking if the expression is a promise or not? What else would be "thenable" besides a promise?

@rsimha
Copy link
Contributor

rsimha commented Apr 29, 2020

Drive-by comment to say thanks for working on this PR, which will have the cascading effect of improving several aspects of our compilation toolchain. Some context:

@kristoferbaxter
Copy link
Contributor Author

Likely won’t be able to work on this for some time, but this PR might be a good jumping off point for someone to complete the work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants