Skip to content

Commit

Permalink
chore: convert HeaderPrimary to TypeScript (#4052)
Browse files Browse the repository at this point in the history
  • Loading branch information
ksvijayan06 authored Oct 2, 2024
1 parent da441c7 commit 4291918
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
import Component from '../../common/Component';
import ItemList from '../../common/utils/ItemList';
import listItems from '../../common/helpers/listItems';
import type Mithril from 'mithril';

/**
* The `HeaderPrimary` component displays primary header controls. On the
* default skin, these are shown just to the right of the forum title.
*/
export default class HeaderPrimary extends Component {
view() {
view(): JSX.Element {
return <ul className="Header-controls">{listItems(this.items().toArray())}</ul>;
}

Expand All @@ -16,7 +17,8 @@ export default class HeaderPrimary extends Component {
*
* @return {ItemList<import('mithril').Children>}
*/
items() {
return new ItemList();

items(): ItemList<Mithril.Children> {
return new ItemList<Mithril.Children>();
}
}

0 comments on commit 4291918

Please sign in to comment.