Skip to content
This repository was archived by the owner on Apr 4, 2025. It is now read-only.

feat(@angular-devkit/build-optimizer): strip Angular decorators in __… #210

Merged
merged 1 commit into from
Oct 17, 2017
Merged

feat(@angular-devkit/build-optimizer): strip Angular decorators in __… #210

merged 1 commit into from
Oct 17, 2017

Conversation

filipesilva
Copy link
Contributor

…decorate call

@filipesilva
Copy link
Contributor Author

/cc @danbucholtz

IgorMinar
IgorMinar previously approved these changes Oct 17, 2017
Copy link
Contributor

@IgorMinar IgorMinar left a comment

Choose a reason for hiding this comment

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

the rest looks good.

return identifierIsMetadata(id, ngMetadata, checker);
});

return (elements.length > ngDecoratorCalls.length) ? ngDecoratorCalls : [exprStmt];
Copy link
Contributor

Choose a reason for hiding this comment

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

this logic is hard to follow. maybe you want to say:

// if all decorators are metadata decorators then return the whole `Class = __decorate([...])'` statement so that it is removed in entirety
return (elements.length === ngDecoratorCalls.length) ? [exprStmt] : ngDecoratorCalls;

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed

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

Successfully merging this pull request may close these issues.

4 participants