summaryrefslogtreecommitdiff
path: root/packages/frontend/src
diff options
context:
space:
mode:
authorsyuilo <4439005+syuilo@users.noreply.github.com>2025-05-10 14:42:18 +0900
committersyuilo <4439005+syuilo@users.noreply.github.com>2025-05-10 14:42:18 +0900
commit039aacb31f7aabeec8c4174efec2c3f97984bea4 (patch)
tree10c0aa56036557092cb1abe593d53ddda8df64c3 /packages/frontend/src
parentBump version to 2025.5.1-alpha.1 (diff)
downloadmisskey-039aacb31f7aabeec8c4174efec2c3f97984bea4.tar.gz
misskey-039aacb31f7aabeec8c4174efec2c3f97984bea4.tar.bz2
misskey-039aacb31f7aabeec8c4174efec2c3f97984bea4.zip
refactor(frontend): better type def of usePagination
Diffstat (limited to 'packages/frontend/src')
-rw-r--r--packages/frontend/src/composables/use-pagination.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/packages/frontend/src/composables/use-pagination.ts b/packages/frontend/src/composables/use-pagination.ts
index f1042985bf..8dd3b888db 100644
--- a/packages/frontend/src/composables/use-pagination.ts
+++ b/packages/frontend/src/composables/use-pagination.ts
@@ -37,8 +37,8 @@ export type PagingCtx<E extends keyof Misskey.Endpoints = keyof Misskey.Endpoint
direction?: 'newer' | 'older';
};
-export function usePagination<T extends MisskeyEntity>(props: {
- ctx: PagingCtx;
+export function usePagination<Endpoint extends keyof Misskey.Endpoints, T = Misskey.Endpoints[Endpoint]['res'] extends (infer I)[] ? I : never>(props: {
+ ctx: PagingCtx<Endpoint>;
useShallowRef?: boolean;
}) {
const items = props.useShallowRef ? shallowRef<T[]>([]) : ref<T[]>([]);