refactor(frontend): widgets/server-metric内の型エラーを除去 (#12937)
This commit is contained in:
parent
fd519f5def
commit
0e536bdd86
13 changed files with 103 additions and 30 deletions
|
|
@ -22,7 +22,7 @@ import XPie from './pie.vue';
|
|||
import bytes from '@/filters/bytes.js';
|
||||
|
||||
const props = defineProps<{
|
||||
connection: any,
|
||||
connection: Misskey.ChannelConnection<Misskey.Channels['serverStats']>,
|
||||
meta: Misskey.entities.ServerInfoResponse
|
||||
}>();
|
||||
|
||||
|
|
@ -31,7 +31,7 @@ const total = ref<number>(0);
|
|||
const used = ref<number>(0);
|
||||
const free = ref<number>(0);
|
||||
|
||||
function onStats(stats) {
|
||||
function onStats(stats: Misskey.entities.ServerStats) {
|
||||
usage.value = stats.mem.active / props.meta.mem.total;
|
||||
total.value = props.meta.mem.total;
|
||||
used.value = stats.mem.active;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue