Please add an event to the LayerList widget so we can listen for changes to layer visibility. For example, in our applications, we want to save the layer configuration whenever something changes. We expected that the LayerList would notify us of changes to layer visibility, but that is currently not the case.
I expect it would look something like so:
const list = new LayerList({ view });
list.on('layer-visibility', (layer) => {
if (layer.visible) doSomething();
else doSomethingElse();
});