You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This has brought up some issues with the return value of the or helper not being correct. The values that the or helper in this addon returns is always one of the args it was given, as if it were a javascript argA || argB. However, it is typed to return strictly boolean, which is not representative of what is actually returned by the helper.
Ah! Thanks. I did not realise it was known / being worked on. Hopefully this issue shows that to others while we work on it so they don't open issues as well.
Thanks for cutting a release with the glint types.
I updated my application to use the 4.0.0-beta.0 and its glint types, switching away from the types provided by the gavant package https://github.com/Gavant/glint-template-types/tree/main/types/ember-truth-helpers
This has brought up some issues with the return value of the
or
helper not being correct. The values that theor
helper in this addon returns is always one of the args it was given, as if it were a javascriptargA || argB
. However, it is typed to return strictly boolean, which is not representative of what is actually returned by the helper.ember-truth-helpers/packages/ember-truth-helpers/src/helpers/or.ts
Line 9 in 0051908
The gavant package types dealt with this in the following way
https://github.com/Gavant/glint-template-types/blob/cd9efb6617d93c28d93800270e3af1963fd792c6/types/ember-truth-helpers/or.d.ts#L21
There's some extra details on the behaviour of the
or
helper in this issue comment#150 (comment)
The text was updated successfully, but these errors were encountered: