From 1fbefcab643555d6c3f2d1d0e02c019b7d9f1348 Mon Sep 17 00:00:00 2001 From: William Wall Date: Tue, 18 Sep 2018 10:38:23 -0600 Subject: [PATCH] Explicitly define type of 'this' I'm not entirely sure that I like this pattern, but there does not appear to be a better option since TypeScript would recommend: function(this: SomeClass, ...) tsdoc does not appear to support an associated annotation for the function a la @this {SomeClass}. --- src/ol/Tile.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ol/Tile.js b/src/ol/Tile.js index 9bae2a8914..1aa36a01ca 100644 --- a/src/ol/Tile.js +++ b/src/ol/Tile.js @@ -180,7 +180,7 @@ class Tile extends EventTarget { } let tile = this.interimTile; - let prev = this; + let prev = /** @type {Tile} */ (this); do { if (tile.getState() == TileState.LOADED) {