mirror of
https://github.com/flarum/framework.git
synced 2025-02-18 12:33:22 +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 = {
|
export type ComponentProps = {
|
||||||
children?: Mithril.Children;
|
children?: Mithril.Children;
|
||||||
|
@ -8,8 +8,8 @@ export type ComponentProps = {
|
||||||
[key: string]: any;
|
[key: string]: any;
|
||||||
};
|
};
|
||||||
|
|
||||||
export default class Component<T extends ComponentProps = any> {
|
export default class Component<T extends ComponentProps = any> implements ClassComponent {
|
||||||
element: HTMLElement;
|
element!: HTMLElement;
|
||||||
|
|
||||||
props: T;
|
props: T;
|
||||||
|
|
||||||
|
|
|
@ -23,7 +23,7 @@ export default class Forum extends Application {
|
||||||
*/
|
*/
|
||||||
cache: {
|
cache: {
|
||||||
notifications?: Notification[][];
|
notifications?: Notification[][];
|
||||||
discussionList?: DiscussionList;
|
discussionList?: DiscussionList | null;
|
||||||
[key: string]: any;
|
[key: string]: any;
|
||||||
} = {};
|
} = {};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user