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