Hello, I’m trying to port a javascript function into my custom extension but I have some difficulties to make it compatible with bokeh typescript compiler.
This is the function (it make the cartesian product of several arrays)
function cartesian_product(...arrays){
return arrays.reduce((acc, curr) =>
acc.flatMap(c => curr.map(n => [].concat(c, n)))
);
}
I need also to reproduce the .flat
method which is in ES20?? is there something already built in bokeh?
thks