Why not do:
const y = x ? true : false;
I'm talking about cases with additional logic that's too long for a ternary.
That sounds like a more complicated way to write
const y = (bool)x;
const bool y = x;
I'm talking about cases with additional logic that's too long for a ternary.
That sounds like a more complicated way to write
or