jmurphyau / ember-truth-helpers

Ember HTMLBars Helpers for {{if}} & {{unless}}: not, and, or, eq & is-array
MIT License
706 stars 95 forks source link

Further type improvements for `or` helper #200

Closed wagenet closed 12 months ago

wagenet commented 12 months ago
SergeAstapov commented 12 months ago

Published as v4.0.3, thank you @wagenet!

boris-petrov commented 12 months ago

Can someone explain to me why so much time is spent updating the types for or? That's only relative to Glint, correct? But hasn't everyone configured their Glint to use additionalSpecialForms for or? Why are these improvements here needed in that case at all?

SergeAstapov commented 12 months ago

But hasn't everyone configured their Glint to use additionalSpecialForms for or?

TBH I only found out this exists only after researching about how generics can be handled in Glint and had no idea that exists before, by stumbling upon this discussion https://github.com/typed-ember/glint/discussions/547#discussioncomment-5415889

We could, probably, PR docs for additionalSpecialForms with and and or helpers in Glint and then point to that from ember-truth-helpers README, however I personally not sure that's what exactly we should be doing, but indeed it's an option.

Techn1x commented 11 months ago

But hasn't everyone configured their Glint to use additionalSpecialForms for or?

had no idea this existed, I doubt many others know of it either. good to know though, and that typed-ember discussion linked above is very helpful!

wagenet commented 11 months ago

I'm honestly not entirely sold on additionalSpecialForms in Glint. I feel a bit uncomfortable about lying about my actual types.