isFlag

function isFlag(x): x is boolean | 0 | 1

Returns true if the target is equal to either zero or one or is a boolean.

Parameters

ParameterType
xunknown

Returns

x is boolean | 0 | 1