From 4291918171c6f2405b7674182065d81ab6686d77 Mon Sep 17 00:00:00 2001 From: Vijayan K S <83622134+ksvijayan06@users.noreply.github.com> Date: Thu, 3 Oct 2024 02:23:35 +0530 Subject: [PATCH] chore: convert HeaderPrimary to TypeScript (#4052) --- .../components/{HeaderPrimary.js => HeaderPrimary.tsx} | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) rename framework/core/js/src/forum/components/{HeaderPrimary.js => HeaderPrimary.tsx} (79%) diff --git a/framework/core/js/src/forum/components/HeaderPrimary.js b/framework/core/js/src/forum/components/HeaderPrimary.tsx similarity index 79% rename from framework/core/js/src/forum/components/HeaderPrimary.js rename to framework/core/js/src/forum/components/HeaderPrimary.tsx index 55282fd22c..328377e273 100644 --- a/framework/core/js/src/forum/components/HeaderPrimary.js +++ b/framework/core/js/src/forum/components/HeaderPrimary.tsx @@ -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 ; } @@ -16,7 +17,8 @@ export default class HeaderPrimary extends Component { * * @return {ItemList} */ - items() { - return new ItemList(); + + items(): ItemList { + return new ItemList(); } }