diff --git a/js/src/forum/extenders/extendDiscussionListState.tsx b/js/src/forum/extenders/extendDiscussionListState.tsx index a43e8ae..9fa3235 100644 --- a/js/src/forum/extenders/extendDiscussionListState.tsx +++ b/js/src/forum/extenders/extendDiscussionListState.tsx @@ -1,9 +1,10 @@ import app from 'flarum/forum/app'; import { extend } from 'flarum/common/extend'; import DiscussionListState from 'flarum/forum/states/DiscussionListState'; +import type { PaginatedListParams } from 'flarum/common/states/PaginatedListState'; export default function extendDiscussionListState() { - extend(DiscussionListState.prototype, 'requestParams', function (params) { + extend(DiscussionListState.prototype, 'requestParams', function (params: PaginatedListParams) { if (app.discussions.bestAnswer) { const negate = app.discussions.bestAnswer === '2'; const prepend = negate ? '-' : ''; @@ -12,7 +13,7 @@ export default function extendDiscussionListState() { params.filter = {}; } - (params.filter as Record)[`${prepend}solved-discussions`] = 'true'; + (params.filter)[`${prepend}solved-discussions`] = 'true'; if (params.filter.q) { params.filter.q += ` ${prepend}is:solved`;