fix(lite): typings errors when running yarn type-check (#7278)
This commit is contained in:
parent
95492f6f89
commit
0f00c7e393
@ -2,6 +2,8 @@
|
||||
|
||||
## **next**
|
||||
|
||||
- Fix Typescript typings errors when running `yarn type-check` command (PR [#7278](https://github.com/vatesfr/xen-orchestra/pull/7278))
|
||||
|
||||
## **0.1.7** (2023-12-28)
|
||||
|
||||
- [VM/Action] Ability to migrate a VM from its view (PR [#7164](https://github.com/vatesfr/xen-orchestra/pull/7164))
|
||||
|
@ -7,7 +7,7 @@ import {
|
||||
} from "@/libs/xapi-stats";
|
||||
import type { XenApiHost, XenApiVm } from "@/libs/xen-api/xen-api.types";
|
||||
import { type Pausable, promiseTimeout, useTimeoutPoll } from "@vueuse/core";
|
||||
import { computed, type ComputedRef, onUnmounted, ref } from "vue";
|
||||
import { computed, type ComputedRef, onUnmounted, ref, type Ref } from "vue";
|
||||
|
||||
export type Stat<T> = {
|
||||
canBeExpired: boolean;
|
||||
@ -42,7 +42,7 @@ export default function useFetchStats<
|
||||
T extends XenApiHost | XenApiVm,
|
||||
S extends HostStats | VmStats = T extends XenApiHost ? HostStats : VmStats,
|
||||
>(getStats: GetStats<T, S>, granularity: GRANULARITY): FetchedStats<T, S> {
|
||||
const stats = ref<Map<string, Stat<S>>>(new Map());
|
||||
const stats = ref(new Map()) as Ref<Map<string, Stat<S>>>;
|
||||
const timestamp = ref<number[]>([0, 0]);
|
||||
const abortController = new AbortController();
|
||||
|
||||
|
@ -15,7 +15,7 @@ type HostConfig = {
|
||||
export const useHostPatches = (hosts: MaybeRefOrGetter<XenApiHost[]>) => {
|
||||
const hostStore = useHostStore();
|
||||
|
||||
const configByHost = reactive(new Map<string, HostConfig>());
|
||||
const configByHost = reactive(new Map()) as Map<string, HostConfig>;
|
||||
|
||||
const fetchHostPatches = async (hostRef: XenApiHost["$ref"]) => {
|
||||
if (!configByHost.has(hostRef)) {
|
||||
|
@ -1,11 +1,11 @@
|
||||
import { computed, ref, unref } from "vue";
|
||||
import type { MaybeRef } from "@vueuse/core";
|
||||
import { computed, ref, type Ref, unref } from "vue";
|
||||
|
||||
export default function useMultiSelect<T>(
|
||||
usableIds: MaybeRef<T[]>,
|
||||
selectableIds?: MaybeRef<T[]>
|
||||
) {
|
||||
const $selected = ref<Set<T>>(new Set());
|
||||
const $selected = ref(new Set()) as Ref<Set<T>>;
|
||||
|
||||
const selected = computed({
|
||||
get() {
|
||||
|
Loading…
Reference in New Issue
Block a user