From 4a0947db4b3392cc11333f22709049707dc15417 Mon Sep 17 00:00:00 2001 From: Franz Liedke Date: Fri, 18 Sep 2020 14:09:28 +0200 Subject: [PATCH] TS: Be more specific in type assertion See https://stackoverflow.com/a/33404548. --- js/src/common/Component.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/src/common/Component.ts b/js/src/common/Component.ts index 5f244d871..8bb7746dd 100644 --- a/js/src/common/Component.ts +++ b/js/src/common/Component.ts @@ -108,7 +108,7 @@ export default abstract class Component implemen * and checking for common issues. */ private setAttrs(attrs: T = {} as T): void { - (this.constructor as any).initAttrs(attrs); + (this.constructor as typeof Component).initAttrs(attrs); if (attrs) { if ('children' in attrs) {