diff --git a/js/src/common/Component.ts b/js/src/common/Component.ts index a0dc5ab14..d433907df 100644 --- a/js/src/common/Component.ts +++ b/js/src/common/Component.ts @@ -1,4 +1,4 @@ -import Mithril from 'mithril'; +import Mithril, { ClassComponent } from 'mithril'; export type ComponentProps = { children?: Mithril.Children; @@ -8,8 +8,8 @@ export type ComponentProps = { [key: string]: any; }; -export default class Component { - element: HTMLElement; +export default class Component implements ClassComponent { + element!: HTMLElement; props: T; diff --git a/js/src/forum/Forum.ts b/js/src/forum/Forum.ts index 49599992d..e9def2ffa 100644 --- a/js/src/forum/Forum.ts +++ b/js/src/forum/Forum.ts @@ -23,7 +23,7 @@ export default class Forum extends Application { */ cache: { notifications?: Notification[][]; - discussionList?: DiscussionList; + discussionList?: DiscussionList | null; [key: string]: any; } = {};