Loading
Convert common/components/RoutePagination to TypeScript
What does this MR do and why?
Convert common/components/RoutePagination.vue and its spec to TypeScript.
Part of &33. Closes #876 (closed)
What changed
- Switched
RoutePagination.vueto<script setup lang="ts">. - Typed props (
totalRows: number,perPage: number) anddefineModel<number>(). - Typed
onPageChangewithnewPage: number | stringand markedvoid router.push(...)so floating promises do not fail lint. - Added
defineExpose({ currentPage })to expose the model ref to parent and specs. - Migrated
RoutePagination.spec.jstoRoutePagination.spec.tswithlet router: Routerper ADR 006, typedwrapper, awaitedtrigger('click'), and separated arrange/act steps with blank lines.
Behaviour changes
None.
Verification
Passed from contributors/:
npm run typecheck && npm run lint && TZ=UTC npm run test -- --run