docs: function createLayer(layerOrSource) {
    // @type {import("../layer/Layer.js").default}
    let layer;
    if (layerOrSource instanceof Source) {
      if (layerOrSource instanceof TileSource) {
        layer = new TileLayer({source: layerOrSource});
      } else if (layerOrSource instanceof ImageSource) {
        layer = new ImageLayer({source: layerOrSource});
      }
    } else {
      layer = layerOrSource;
    }
    return layer;
  }