Skip to content

Commit

Permalink
any resolved
Browse files Browse the repository at this point in the history
  • Loading branch information
rvilarl committed Apr 16, 2021
1 parent cf10955 commit 7bbca50
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/textfont.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,7 @@ export class TextFont {
protected fontCacheKey: string = '';

protected static registryInstance: TextFontRegistry[];
// eslint-disable-next-line
protected static textWidthCacheInstance?: any;
protected static textWidthCacheInstance?: Record<string, Record<string, number>>;

protected size: number;
protected attrs: TextFontAttributes;
Expand Down Expand Up @@ -181,8 +180,7 @@ export class TextFont {

// ### textWidthCache
// Static cache of widths hashed on font/string.
static get textWidthCache(): // eslint-disable-next-line
any {
static get textWidthCache(): Record<string, Record<string, number>> {
if (typeof TextFont.textWidthCacheInstance === 'undefined') {
TextFont.textWidthCacheInstance = {};
}
Expand Down

0 comments on commit 7bbca50

Please sign in to comment.