From dfdde2daf238628dfb110c807a5249c31b903af1 Mon Sep 17 00:00:00 2001 From: Joris Date: Mon, 13 Feb 2023 08:18:42 +0100 Subject: Upgrade rx to 1.0.1 and add type hints --- src/view/filters.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/view/filters.ts') diff --git a/src/view/filters.ts b/src/view/filters.ts index 9ce277b..efe4115 100644 --- a/src/view/filters.ts +++ b/src/view/filters.ts @@ -1,4 +1,4 @@ -import { h, Rx } from 'lib/rx' +import { h, Rx, Html } from 'lib/rx' import * as Book from 'book' import * as I18n from 'lib/i18n' @@ -18,7 +18,7 @@ interface ViewFiltersParams { updateFilters: (f: (filters: Model) => Model) => void } -export function view({ filteredBooks, filters, updateFilters }: ViewFiltersParams) { +export function view({ filteredBooks, filters, updateFilters }: ViewFiltersParams): Html { return h('ul', h('li', [ h('div', { className: 'g-FilterTitle' }, 'Lecture'), @@ -40,7 +40,7 @@ interface ReadFilterParams { update: (status?: Book.ReadStatus) => void } -function readFilter({ filteredBooks, readStatus, update }: ReadFilterParams) { +function readFilter({ filteredBooks, readStatus, update }: ReadFilterParams): Html { return h('ul', { className: 'g-Filters' }, readStatus.map(currentStatus => { -- cgit v1.2.3