Closed NullVoxPopuli closed 6 months ago
Run & review this pull request in StackBlitz Codeflow.
Estimated impact to a consuming app, depending on which bundle is imported
js | min | min + gzip | min + brotli | |
---|---|---|---|---|
/index.js | 18.45 kB | 4.39 kB | 1.65 kB | 1.45 kB |
readme: https://d19c001f.ember-resources.pages.dev api docs: https://d19c001f.ember-resources.pages.dev/modules.html
This is an important public API to formally support things like
ember-modify-based-class-resource
, as well as allow others to create usables in their libraries._
registerUsable
is a very light wrapper aroundinvokeHelper
that allows customization of how args are pasesd to to the "helper"_For example, if ember-concurrency wanted to integrate with the usable system, they could do something like this:
Provided that:
definition
is registered with the helper-manager system.config
object has atype
property with value set toember-concurrency
-- in practice this would be a property set on the result of theirtask
function.registerUsable
is used in two places at the time of putting this PR up:in the class-based extracted addon, linked above:
This PR had a cascading affect which allowed the removal of some old Types that were previously only used for the class-based implementation.