Skip to content

Commit 69e34f0

Browse files
committed
fix types
1 parent 3d6a982 commit 69e34f0

File tree

2 files changed

+12
-6
lines changed

2 files changed

+12
-6
lines changed

projects/packages/forms/src/dashboard/inbox/dataviews/actions.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import { defaultView } from './views';
1818
/**
1919
* Types
2020
*/
21-
import type { Action, QueryParams } from './types';
21+
import type { Action, QueryParams, Registry } from './types';
2222

2323
/**
2424
* Helper function to extract count-relevant query params from the current query.
@@ -57,11 +57,11 @@ const getCountQueryParams = ( currentQuery: QueryParams ): QueryParams => {
5757
* @param {string} statusBeingRemovedFrom - The status items are being removed from ('trash', 'spam', or 'inbox').
5858
*/
5959
const invalidateCacheAndNavigate = (
60-
registry,
61-
currentQuery,
62-
queryParams,
63-
statusBeingRemovedFrom
64-
) => {
60+
registry: Registry,
61+
currentQuery: QueryParams,
62+
queryParams: QueryParams,
63+
statusBeingRemovedFrom: string
64+
): void => {
6565
// Invalidate counts to ensure accurate totals
6666
registry.dispatch( dashboardStore ).invalidateCounts();
6767

projects/packages/forms/src/dashboard/inbox/dataviews/types.tsx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ export type QueryParams = {
1010
before?: string;
1111
after?: string;
1212
is_unread?: boolean;
13+
per_page?: number;
14+
page?: number;
1315
};
1416

1517
/**
@@ -58,10 +60,14 @@ export type Registry = {
5860
invalidateFilters: () => void;
5961
invalidateCounts: () => void;
6062
markRecordsAsInvalid: ( ids: number[] ) => void;
63+
setCurrentQuery: ( queryParams: QueryParams ) => void;
6164
};
6265
select: ( store: StoreDescriptor ) => {
6366
// Dashboard store select actions
6467
getCurrentQuery: () => QueryParams;
68+
getTrashCount: ( queryParams: QueryParams ) => number;
69+
getSpamCount: ( queryParams: QueryParams ) => number;
70+
getInboxCount: ( queryParams: QueryParams ) => number;
6571

6672
// Core store select actions
6773
getEntityRecord: (

0 commit comments

Comments
 (0)