1
0
mirror of https://github.com/flarum/core.git synced 2025-08-12 03:14:33 +02:00

fix: eliminate JSX.Element from generated typings

Either add JSDoc or TypeScript annotations so that `Mithril.Children` is always returned in favor of `JSX.Element`.
This commit is contained in:
Alexander Skvortsov
2022-03-19 16:04:41 -04:00
parent 6df4101bae
commit c9fdd0753f
104 changed files with 391 additions and 125 deletions

View File

@@ -64,7 +64,7 @@ export default class Updater<Attrs> extends Component<Attrs> {
super.oninit(vnode);
}
view() {
view(): Mithril.Children {
const extensions = this.getExtensionUpdates();
let coreUpdate: UpdatedPackage | undefined = this.getCoreUpdate();
let core: any;

View File

@@ -26,7 +26,7 @@ export default class WhyNotModal<Attrs extends WhyNotModalAttrs = WhyNotModalAtt
this.requestWhyNot();
}
content() {
content(): Mithril.Children {
return <div className="Modal-body">{this.loading ? <LoadingIndicator /> : <pre className="WhyNotModal-contents">{this.whyNot}</pre>}</div>;
}