mirror of
https://github.com/ArthurDanjou/ui.git
synced 2026-01-23 16:30:45 +01:00
docs: types (#2186)
This commit is contained in:
@@ -26,7 +26,7 @@ export function useToast() {
|
||||
return body
|
||||
}
|
||||
|
||||
function update(id: string | number, toast: Omit<Partial<Toast>, "id">) {
|
||||
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] = {
|
||||
|
||||
@@ -19,7 +19,7 @@ export function omit<Data extends object, Keys extends keyof Data>(data: Data, k
|
||||
return result as Omit<Data, Keys>
|
||||
}
|
||||
|
||||
export function get(object: Record<string, any>, path: (string | number)[] | string, defaultValue?: any): any {
|
||||
export function get(object: Record<string, any> | undefined, path: (string | number)[] | string, defaultValue?: any): any {
|
||||
if (typeof path === 'string') {
|
||||
path = path.split('.').map((key) => {
|
||||
const numKey = Number(key)
|
||||
|
||||
Reference in New Issue
Block a user