mirror of
https://github.com/flarum/core.git
synced 2025-08-04 07:27:39 +02:00
change a few typings
This commit is contained in:
@@ -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;
|
||||||
} = {};
|
} = {};
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user