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}.
This commit is contained in:
William Wall
2018-09-18 10:38:23 -06:00
parent 5910e4d207
commit 1fbefcab64

View File

@@ -180,7 +180,7 @@ class Tile extends EventTarget {
} }
let tile = this.interimTile; let tile = this.interimTile;
let prev = this; let prev = /** @type {Tile} */ (this);
do { do {
if (tile.getState() == TileState.LOADED) { if (tile.getState() == TileState.LOADED) {