refactor: paginationの型を明示する (#12809)
* refactor: paginationの型を明示する * asではなくsatisfiesを使うように
This commit is contained in:
@@ -38,14 +38,14 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||
|
||||
<script lang="ts" setup>
|
||||
import * as Misskey from 'misskey-js';
|
||||
import MkPagination from '@/components/MkPagination.vue';
|
||||
import MkPagination, { Paging } from '@/components/MkPagination.vue';
|
||||
import MkDriveFileThumbnail from '@/components/MkDriveFileThumbnail.vue';
|
||||
import bytes from '@/filters/bytes.js';
|
||||
import { i18n } from '@/i18n.js';
|
||||
import { dateString } from '@/filters/date.js';
|
||||
|
||||
const props = defineProps<{
|
||||
pagination: any;
|
||||
pagination: Paging;
|
||||
viewMode: 'grid' | 'list';
|
||||
}>();
|
||||
</script>
|
||||
|
@@ -224,7 +224,7 @@ import { claimAchievement } from '@/scripts/achievements.js';
|
||||
import MkRippleEffect from '@/components/MkRippleEffect.vue';
|
||||
import { showMovedDialog } from '@/scripts/show-moved-dialog.js';
|
||||
import MkUserCardMini from '@/components/MkUserCardMini.vue';
|
||||
import MkPagination from '@/components/MkPagination.vue';
|
||||
import MkPagination, { Paging } from '@/components/MkPagination.vue';
|
||||
import MkReactionIcon from '@/components/MkReactionIcon.vue';
|
||||
import MkButton from '@/components/MkButton.vue';
|
||||
|
||||
@@ -307,7 +307,7 @@ const renotesPagination = computed(() => ({
|
||||
params: {
|
||||
noteId: appearNote.value.id,
|
||||
},
|
||||
}));
|
||||
} satisfies Paging));
|
||||
|
||||
const reactionsPagination = computed(() => ({
|
||||
endpoint: 'notes/reactions',
|
||||
@@ -316,7 +316,7 @@ const reactionsPagination = computed(() => ({
|
||||
noteId: appearNote.value.id,
|
||||
type: reactionTabType.value,
|
||||
},
|
||||
}));
|
||||
} satisfies Paging));
|
||||
|
||||
useNoteCapture({
|
||||
rootEl: el,
|
||||
|
@@ -37,15 +37,15 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||
import { i18n } from '@/i18n.js';
|
||||
import MkFolder from '@/components/MkFolder.vue';
|
||||
import XUser from '@/components/MkUserSetupDialog.User.vue';
|
||||
import MkPagination from '@/components/MkPagination.vue';
|
||||
import MkPagination, { Paging } from '@/components/MkPagination.vue';
|
||||
|
||||
const pinnedUsers = { endpoint: 'pinned-users', noPaging: true };
|
||||
const pinnedUsers = { endpoint: 'pinned-users', noPaging: true } satisfies Paging;
|
||||
|
||||
const popularUsers = { endpoint: 'users', limit: 10, noPaging: true, params: {
|
||||
state: 'alive',
|
||||
origin: 'local',
|
||||
sort: '+follower',
|
||||
} };
|
||||
} } satisfies Paging;
|
||||
</script>
|
||||
|
||||
<style lang="scss" module>
|
||||
|
Reference in New Issue
Block a user