-
Notifications
You must be signed in to change notification settings - Fork 23
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
Update argument handling #23
Conversation
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.
LGTM. Is this something that might be ever be bundled in glimmer VM itself or is it too dynamic?
@cibernox that's the plan! I think it just so happens that no one has the cycle to work on the actual implementation yet, probably partly due to this polyfill being good enough, so I guess that's somewhat my fault :P |
373cf3a
to
1b1a2ca
Compare
c69dd03
to
76e1737
Compare
28fcb78
to
b0b3a9b
Compare
This commit updates the argument handling: * To match [RFC PR #620](emberjs/rfcs#620) * Returns `null` on `null` or `undefined` * Use development mode assertions for other invalid arguments * Add test for modifiers usage * Add test for `...attributes` usage * To match more closely the likely Ember side implementation * Handle argument errors at runtime * `owner.hasRegistration('helper:element') === true` Since the argument errors are moved to runtime, this also removes the need for separate node tests. Previously, that also caused an error when `ember-auto-import` is included. Since we removed the `qunit` dependency we can now include `ember-auto-import` to align with the default addon blueprint. See also https://discordapp.com/channels/480462759797063690/485447409296736276/704799818316251216 Closes #6
b0b3a9b
to
4841ffd
Compare
This commit updates the argument handling:
null
onnull
orundefined
...attributes
usageowner.hasRegistration('helper:element') === true
Since the argument errors are moved to runtime, this also removes the need for separate node tests. Previously, that also caused an error when
ember-auto-import
is included. Since we removed thequnit
dependency we can now includeember-auto-import
to align with the default addon blueprint.See also https://discordapp.com/channels/480462759797063690/485447409296736276/704799818316251216