Replies: 1 comment
-
I suppose I can see how what we have now is an awkward middle ground. Probably it makes sense to only support receiving a |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Current Situation
Emitter Framework (EF) re-exports the Alloy components it builds on top of, allowing emitters to import an EF component even when they don’t need to pass a TypeSpec type. In practice, this means you can pick up a component from EF instead of importing it directly from Alloy.
Upsides
@alloyjs/...
and@typespec/emitter-framework/...
).Downsides
Proposal
Remove support for “Type-less” (Alloy) components in EF so that the distinction is always clear:
Rationale
In practice, emitters frequently have to pull in building blocks from EF and Alloy anyway. The re-exports in EF rarely save enough friction to justify the confusion.
If we were aiming to completely hide Alloy behind EF, re-exports would make sense. But since EFv2 isn’t trying to become a one-stop shop for everything Alloy provides, keeping the re-exports only creates ambiguity.
By removing the “Type-less” exports from EF, we make it unambiguous which package to use in each situation, reduce the mental overhead of choosing between EF-vs-Alloy imports, and avoid accidental inconsistencies at runtime.
Beta Was this translation helpful? Give feedback.
All reactions