In Typescript I can do this:
var xxx : some_type; if (xxx) foo(); else bar();
Here xxx will be treated as a boolean, regardless of its
Use this
YourMethod(!!isEnabled);
'!!' is used for type casting to boolean