Introduce @glint/environment-ember-loose
#34
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.
This PR begins to address #23. While this isn't yet a complete implementation, it provides a core we can use to develop against while building out support for standalone template files elsewhere in glint.
Points of interest:
.hbs
files, including what types module applies to them and how to map between templates and their backing scripts@glint/environment-ember-loose
includes signatures for Glimmer components, Ember components and helpers, andember-modifier
modifiers. It doesn't handle controllers/routes yet (there are some potentially interesting design questions there), but those are an important aspect of today's Ember programming model, so eventually that needs to be accounted for.compute
in a typesafe way without clashing with the upstream definition in@types/ember__component
. This is similar to the problem we have in Figure out the shape of component type parameters #25 where we want to capture more type information than the base class is currently interested in. One short-term option might be for the environment to include re-exports of the upstream base classes cast to the appropriate types, but for now we just have@ts-expect-error
action
,each-in
,link-to
,log
), as well as the core keywords defined in@glint/template
, but many more remain to be added.