function withinExtentAndZ(tileCoord, tileGrid) {
  const z = tileCoord[0];
  const x = tileCoord[1];
  const y = tileCoord[2];

  if (tileGrid.getMinZoom() > z || z > tileGrid.getMaxZoom()) {
    return false;
  }
  const tileRange = tileGrid.getFullTileRange(z);
  if (!tileRange) {
    return true;
  }
  return tileRange.containsXY(x, y);
}
@param {TileCoord} tileCoord Tile coordinate.
@param {!import("./tilegrid/TileGrid.js").default} tileGrid Tile grid.
@return {boolean} Tile coordinate is within extent and zoom level range.