aboutsummaryrefslogtreecommitdiff
path: root/src/view
diff options
context:
space:
mode:
authorJoris2023-02-13 08:18:42 +0100
committerJoris2023-02-13 08:18:55 +0100
commitdfdde2daf238628dfb110c807a5249c31b903af1 (patch)
tree86976e201cde613c100dfc320aececd936a8a224 /src/view
parent25ecb1cb75b7b5b584ad223e12d74c3e3ee7da89 (diff)
Upgrade rx to 1.0.1 and add type hints
Diffstat (limited to 'src/view')
-rw-r--r--src/view/filters.ts6
1 files changed, 3 insertions, 3 deletions
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 => {