mirror of
https://github.com/flarum/framework.git
synced 2024-11-25 17:57:04 +08:00
change a few typings
This commit is contained in:
parent
e86940b6a3
commit
9b83159be5
|
@ -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<T extends ComponentProps = any> {
|
||||
element: HTMLElement;
|
||||
export default class Component<T extends ComponentProps = any> implements ClassComponent {
|
||||
element!: HTMLElement;
|
||||
|
||||
props: T;
|
||||
|
||||
|
|
|
@ -23,7 +23,7 @@ export default class Forum extends Application {
|
|||
*/
|
||||
cache: {
|
||||
notifications?: Notification[][];
|
||||
discussionList?: DiscussionList;
|
||||
discussionList?: DiscussionList | null;
|
||||
[key: string]: any;
|
||||
} = {};
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user