Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function constructBoolean(bool: ConditionalArg): AST.Expression[] {
if (typeof bool === "number") {
return [builders.number(bool)];
} else if (isAndExpression(bool)) {
return constructAndExpression(bool);
} else if (isOrExpression(bool)) {
return constructOrExpression(bool);
} else if (isNotExpression(bool)) {
return constructNotExpression(bool);
} else {
assertNever(bool);
return [builders.null()];
}
}