Merge pull request #8869 from ahocevar/typescript-fixes

Fix more types for TypeScript
This commit is contained in:
Andreas Hocevar
2018-10-31 12:07:28 +01:00
committed by GitHub
6 changed files with 26 additions and 21 deletions

View File

@@ -721,7 +721,8 @@ class CanvasReplay extends VectorContext {
const pathLength = lineStringLength(pixelCoordinates, begin, end, 2);
const textLength = measure(text);
if (overflow || textLength <= pathLength) {
const textReplay = /** @type {import("./TextReplay.js").default} */ (this);
/** @type {import("./TextReplay.js").default} */
const textReplay = /** @type {?} */ (this);
const textAlign = textReplay.textStates[textKey].textAlign;
const startM = (pathLength - textLength) * TEXT_ALIGN[textAlign];
const parts = drawTextOnPath(