Bugfixes for the beta.5 bind-invokable
refactor
#561
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The 1.0.0-beta.5 release of Glint introduced support for
{{helper}}
and{{modifier}}
by way of a newbind-invokable
abstraction based on the existing{{component}}
implementation. As folks have kicked the tires on that refactor, a few bugs and inconsistencies have come to light:{{modifier}}
fails when pre-binding multiple positional arguments #559: the type signature allowed for multiple arguments, but due to some strange interactions in TypeScript's context-sensitive inference, it would frequently infer a version of the signature that only accepted one positional arg. We fix this by wrapping theresolveForBind
call in an IIFE, which acts as an opaque barrier to context propagation for inference.component
and assigning it vialet
#556: we weren't constraining the results ofbind-invokable
calls withemitContent
as we should have when they appeared in a top-level positioncomponent "link-to"
seems broken onbeta.5
#555: we were missing a special case for string-namedDirectInvokable
s forenvironment-ember-loose
I've run some targeted sets of tests with these changes, but will let CI tell me if other further-reaching impacts need to be accounted for somewhere in our integration/acceptance tests.