Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function constructSwitch(stateExpr: Switch & HasGroup & HasAttrValue, rewrite: IndexedClassRewrite
function constructOutputArgs(rewrite: IndexedClassRewrite): AST.Expression[] {
let expr = new Array();
for (let out of rewrite.dynamicClasses) {
expr.push(builders.string(out));
expr.push(...constructBoolean(rewrite.dynamicClass(out)!));
}
return expr;
}
(arr, val) => {
if (val.type === "TextNode") {
arr.push(builders.string(val.chars));
} else {
arr.push(val.path);
}
return arr;
},
new Array()));