Resolves #221. With this PR merged, you should be able to fully make use of type narrowing for discriminated unions.
Note that the type effects of these operators do not strictly match the semantics specified by RFC 562, in that they express JavaScript truthiness instead of Handlebars truthiness. It's not clear to me that it is possible to express Handlebars truthiness in TypeScript in such a way that you can usefully narrow types with it in combination with logical operators.
As these helpers have not yet been merged into Ember, you can opt in by adding to your glint config:
Resolves #221. With this PR merged, you should be able to fully make use of type narrowing for discriminated unions.
Note that the type effects of these operators do not strictly match the semantics specified by RFC 562, in that they express JavaScript truthiness instead of Handlebars truthiness. It's not clear to me that it is possible to express Handlebars truthiness in TypeScript in such a way that you can usefully narrow types with it in combination with logical operators.
As these helpers have not yet been merged into Ember, you can opt in by adding to your glint config: