-
Notifications
You must be signed in to change notification settings - Fork 4
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
feat: add @forbidExtraArgs decorator #72
Conversation
kevinhinterlong
commented
Oct 22, 2021
- throws error if unknown arguments are passed (e.g. no corresponding @arg in component)
- only extend class in debug mode
- update docs for @forbidExtraArgs
- throws error if unknown arguments are passed (e.g. no corresponding @arg in component) - only extend class in debug mode - update docs for @@forbidExtraArgs
- better testing
addon/-private/closest-string.ts
Outdated
@@ -0,0 +1,54 @@ | |||
// https://stackoverflow.com/a/36566052 | |||
function editDistance(s1: string, s2: string) { |
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.
I wonder if we can prune this from prod build.
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.
I was able to remove the code, but not the module from the prod build using @embroider/macros
.
Here's the stats of npm ci && ember build --environment="production"
9dfb367 (origin/main)
dist/assets/vendor-cc4233d3b7e5776c9b844d7c3d4ad987.js: 453.59 KB (127.62 KB gzipped)
0ead844
dist/assets/vendor-745ebb22057b189d3eb1f47842a4565d.js: 455.02 KB (128.07 KB gzipped)
a3cd41a
dist/assets/vendor-c13bd7dc8daa2fed4b29e9042c69bd03.js: 454.52 KB (127.82 KB gzipped)
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 is how prop-types does it too. https://github.com/jkusa/ember-arg-types#production
Closing then opening to trigger build |