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

optional loader behavior for factory arity < 3 #33

Open
hax opened this issue May 25, 2017 · 0 comments
Open

optional loader behavior for factory arity < 3 #33

hax opened this issue May 25, 2017 · 0 comments

Comments

@hax
Copy link

hax commented May 25, 2017

However, if the factory function's arity (length property) is less than 3, then the loader may choose to only call the factory with the number of arguments corresponding to the function's arity or length.

This optional loader behavior for factory arity < 3 is unnecessary and introduce potential inconsistency.

Prior ES6, arguments can be used to get actual arguments; and in ES6+, the arity of function (a, b = 0, c) is 1. In both cases, the loaders which choose or not choose this behavior will have different results.

This paragraph also make some misunderstanding of allowing loader not call factory if arity == 0, like babel/babel#3620 try to solve.

Suggestion: Just remove it.

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

No branches or pull requests

1 participant