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:
@@ -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) {
|
||||||
|
|||||||
Reference in New Issue
Block a user