mirror of
https://github.com/flarum/core.git
synced 2025-08-12 11:24:30 +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:
@@ -13,6 +13,9 @@ export default class FlagList extends Component {
|
||||
this.state = this.attrs.state;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return {import('mithril').Children}
|
||||
*/
|
||||
view() {
|
||||
const flags = this.state.cache || [];
|
||||
|
||||
|
@@ -24,6 +24,9 @@ export default class FlagPostModal extends Modal {
|
||||
return app.translator.trans('flarum-flags.forum.flag_post.title');
|
||||
}
|
||||
|
||||
/**
|
||||
* @return {import('mithril').Children}
|
||||
*/
|
||||
content() {
|
||||
if (this.success) {
|
||||
return (
|
||||
|
@@ -11,6 +11,9 @@ export default class FlagsDropdown extends NotificationsDropdown {
|
||||
super.initAttrs(attrs);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return {import('mithril').Children}
|
||||
*/
|
||||
getMenu() {
|
||||
return (
|
||||
<div className={'Dropdown-menu ' + this.attrs.menuClassName} onclick={this.menuClick.bind(this)}>
|
||||
|
@@ -18,6 +18,9 @@ export default class FlagsPage extends Page {
|
||||
this.bodyClass = 'App--flags';
|
||||
}
|
||||
|
||||
/**
|
||||
* @return {import('mithril').Children}
|
||||
*/
|
||||
view() {
|
||||
return (
|
||||
<div className="FlagsPage">
|
||||
|
Reference in New Issue
Block a user