diff --git a/externs/olx.js b/externs/olx.js
index 29caa4202a..55387980ba 100644
--- a/externs/olx.js
+++ b/externs/olx.js
@@ -649,86 +649,6 @@ olx.style.StyleOptions.prototype.text;
olx.style.StyleOptions.prototype.zIndex;
-/**
- * @typedef {{extent: (ol.Extent|undefined),
- * minZoom: (number|undefined),
- * origin: (ol.Coordinate|undefined),
- * origins: (Array.
|undefined),
- * resolutions: !Array.,
- * sizes: (Array.|undefined),
- * tileSize: (number|ol.Size|undefined),
- * tileSizes: (Array.|undefined)}}
- */
-olx.tilegrid.TileGridOptions;
-
-
-/**
- * Extent for the tile grid. No tiles outside this extent will be requested by
- * {@link ol.source.Tile} sources. When no `origin` or `origins` are
- * configured, the `origin` will be set to the top-left corner of the extent.
- * @type {ol.Extent|undefined}
- * @api
- */
-olx.tilegrid.TileGridOptions.prototype.extent;
-
-
-/**
- * Minimum zoom. Default is 0.
- * @type {number|undefined}
- * @api
- */
-olx.tilegrid.TileGridOptions.prototype.minZoom;
-
-
-/**
- * The tile grid origin, i.e. where the `x` and `y` axes meet (`[z, 0, 0]`).
- * Tile coordinates increase left to right and upwards. If not specified,
- * `extent` or `origins` must be provided.
- * @type {ol.Coordinate|undefined}
- * @api
- */
-olx.tilegrid.TileGridOptions.prototype.origin;
-
-
-/**
- * Tile grid origins, i.e. where the `x` and `y` axes meet (`[z, 0, 0]`), for
- * each zoom level. If given, the array length should match the length of the
- * `resolutions` array, i.e. each resolution can have a different origin. Tile
- * coordinates increase left to right and upwards. If not specified, `extent`
- * or `origin` must be provided.
- * @type {Array.|undefined}
- * @api
- */
-olx.tilegrid.TileGridOptions.prototype.origins;
-
-
-/**
- * Resolutions. The array index of each resolution needs to match the zoom
- * level. This means that even if a `minZoom` is configured, the resolutions
- * array will have a length of `maxZoom + 1`.
- * @type {!Array.}
- * @api
- */
-olx.tilegrid.TileGridOptions.prototype.resolutions;
-
-
-/**
- * Tile size. Default is `[256, 256]`.
- * @type {number|ol.Size|undefined}
- * @api
- */
-olx.tilegrid.TileGridOptions.prototype.tileSize;
-
-
-/**
- * Tile sizes. If given, the array length should match the length of the
- * `resolutions` array, i.e. each resolution can have a different tile size.
- * @type {Array.|undefined}
- * @api
- */
-olx.tilegrid.TileGridOptions.prototype.tileSizes;
-
-
/**
* @typedef {{extent: (ol.Extent|undefined),
* origin: (ol.Coordinate|undefined),
diff --git a/src/ol/tilegrid.js b/src/ol/tilegrid.js
index 18875e8e6a..6e9a0643c4 100644
--- a/src/ol/tilegrid.js
+++ b/src/ol/tilegrid.js
@@ -77,7 +77,7 @@ export function createForExtent(extent, opt_maxZoom, opt_tileSize, opt_corner) {
* @api
*/
export function createXYZ(opt_options) {
- const options = /** @type {olx.tilegrid.TileGridOptions} */ ({});
+ const options = /** @type {module:ol/tilegrid/TileGrid~Options} */ ({});
assign(options, opt_options !== undefined ?
opt_options : /** @type {olx.tilegrid.XYZOptions} */ ({}));
if (options.extent === undefined) {
diff --git a/src/ol/tilegrid/TileGrid.js b/src/ol/tilegrid/TileGrid.js
index 63989395b3..d1935301fd 100644
--- a/src/ol/tilegrid/TileGrid.js
+++ b/src/ol/tilegrid/TileGrid.js
@@ -10,13 +10,40 @@ import {clamp} from '../math.js';
import {toSize} from '../size.js';
import {createOrUpdate as createOrUpdateTileCoord} from '../tilecoord.js';
+
+/**
+ * @typedef {Object} Options
+ * @property {module:ol/extent~Extent} [extent] Extent for the tile grid. No tiles outside this
+ * extent will be requested by {@link module:ol/source/Tile} sources. When no `origin` or
+ * `origins` are configured, the `origin` will be set to the top-left corner of the extent.
+ * @property {number} [minZoom=0] Minimum zoom.
+ * @property {module:ol/coordinate~Coordinate} [origin] The tile grid origin, i.e. where the `x`
+ * and `y` axes meet (`[z, 0, 0]`). Tile coordinates increase left to right and upwards. If not
+ * specified, `extent` or `origins` must be provided.
+ * @property {Array.} [origins] Tile grid origins, i.e. where
+ * the `x` and `y` axes meet (`[z, 0, 0]`), for each zoom level. If given, the array length
+ * should match the length of the `resolutions` array, i.e. each resolution can have a different
+ * origin. Tile coordinates increase left to right and upwards. If not specified, `extent` or
+ * `origin` must be provided.
+ * @property {!Array.} resolutions Resolutions. The array index of each resolution needs
+ * to match the zoom level. This means that even if a `minZoom` is configured, the resolutions
+ * array will have a length of `maxZoom + 1`.
+ * @property {Array.} [sizes] Sizes.
+ * @property {number|module:ol/size~Size} [tileSize] Tile size.
+ * Default is `[256, 256]`.
+ * @property {Array.} [tileSizes] Tile sizes. If given, the array length
+ * should match the length of the `resolutions` array, i.e. each resolution can have a different
+ * tile size.
+ */
+
+
/**
* @classdesc
* Base class for setting the grid pattern for sources accessing tiled-image
* servers.
*
* @constructor
- * @param {olx.tilegrid.TileGridOptions} options Tile grid options.
+ * @param {module:ol/tilegrid/TileGrid~Options} options Tile grid options.
* @struct
* @api
*/