mirror of
https://github.com/ArthurDanjou/ui.git
synced 2026-02-01 04:37:57 +01:00
fix(playground): typecheck
This commit is contained in:
@@ -180,7 +180,7 @@ const groups = computed(() => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
acc[item.group] ||= []
|
acc[item.group] ||= []
|
||||||
acc[item.group].push({ ...item, matches })
|
acc[item.group]?.push({ ...item, matches })
|
||||||
|
|
||||||
return acc
|
return acc
|
||||||
}, {} as Record<string, (T & { matches?: FuseResult<T>['matches'] })[]>)
|
}, {} as Record<string, (T & { matches?: FuseResult<T>['matches'] })[]>)
|
||||||
|
|||||||
@@ -26,11 +26,11 @@ export function useToast() {
|
|||||||
return body
|
return body
|
||||||
}
|
}
|
||||||
|
|
||||||
function update(id: string | number, toast: Partial<Toast>) {
|
function update(id: string | number, toast: Omit<Partial<Toast>, "id">) {
|
||||||
const index = toasts.value.findIndex((t: Toast) => t.id === id)
|
const index = toasts.value.findIndex((t: Toast) => t.id === id)
|
||||||
if (index !== -1) {
|
if (index !== -1) {
|
||||||
toasts.value[index] = {
|
toasts.value[index] = {
|
||||||
...toasts.value[index],
|
...toasts.value[index] as Toast,
|
||||||
...toast
|
...toast
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -40,7 +40,7 @@ export function useToast() {
|
|||||||
const index = toasts.value.findIndex((t: Toast) => t.id === id)
|
const index = toasts.value.findIndex((t: Toast) => t.id === id)
|
||||||
if (index !== -1) {
|
if (index !== -1) {
|
||||||
toasts.value[index] = {
|
toasts.value[index] = {
|
||||||
...toasts.value[index],
|
...toasts.value[index] as Toast,
|
||||||
open: false
|
open: false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user