Open jelhan opened 11 months ago
Neither the Guides nor the API docs suggest that each-in
handles Map
s specially, from what I can see. Can you point to documentation for that?
The guides and api docs are underspecified.
It makes sense that you'd want to allow all iterables, and each/each-in do work with all iterables
Neither the Guides nor the API docs suggest that
each-in
handlesMap
s specially, from what I can see. Can you point to documentation for that?
Support was added in Ember 3.2.0. It was considered a bug fix. Please find details in the changelog: https://github.com/emberjs/ember.js/blob/main/CHANGELOG.md#v320-may-31-2018
In that case a PR to account for the behavior would be welcome
The guides and api docs are underspecified
Given that the guides talk about each-in
by way of comparison to Object.keys
and for...in
loops, both of which are not iterable-aware, I'd say they're more than underspecified and rather actively misleading.
The value of
{{#each-in}}
has an unexpected type if being used with aMap
. Even trying to render the value in the template throws an error.Simple reproduction:
Please note that it is working fine if using a POJO instead of a
Map
.typescript: 5.2.2 @glint/template: 1.2.1