function createForExtent(extent, maxZoom, tileSize, corner) {
  corner = corner !== undefined ? corner : 'top-left';

  const resolutions = resolutionsFromExtent(extent, maxZoom, tileSize);

  return new TileGrid({
    extent: extent,
    origin: getCorner(extent, corner),
    resolutions: resolutions,
    tileSize: tileSize,
  });
}
@param {import("./extent.js").Extent} extent Extent.
@param {number} [maxZoom] Maximum zoom level (default is
    DEFAULT_MAX_ZOOM).
@param {number|import("./size.js").Size} [tileSize] Tile size (default uses
    DEFAULT_TILE_SIZE).
@param {import("./extent.js").Corner} [corner] Extent corner (default is `'top-left'`).
@return {!TileGrid} TileGrid instance.