From 64c38cb35ea35e975b18b1c65ff88eae34e47853 Mon Sep 17 00:00:00 2001 From: Benjamin Canac Date: Thu, 25 Jul 2024 12:44:07 +0200 Subject: [PATCH] chore(types): use `(...args: any[]) => void` instead of `Function` --- src/runtime/types/alert.ts | 2 +- src/runtime/types/command-palette.ts | 4 ++-- src/runtime/types/dropdown.ts | 2 +- src/runtime/types/horizontal-navigation.ts | 2 +- src/runtime/types/notification.ts | 6 +++--- src/runtime/types/vertical-navigation.ts | 2 +- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/runtime/types/alert.ts b/src/runtime/types/alert.ts index 59ef02a8..d9059dbf 100644 --- a/src/runtime/types/alert.ts +++ b/src/runtime/types/alert.ts @@ -8,5 +8,5 @@ export type AlertColor = keyof typeof alert.color | ExtractDeepKey | NestedKeyOf | NestedKeyOf> export interface AlertAction extends Button { - click?: Function + click?: (...args: any[]) => void } diff --git a/src/runtime/types/command-palette.ts b/src/runtime/types/command-palette.ts index d08acfc5..b573cd67 100644 --- a/src/runtime/types/command-palette.ts +++ b/src/runtime/types/command-palette.ts @@ -22,8 +22,8 @@ export interface Group { active?: string inactive?: string commands?: Command[] - search?: Function - filter?: Function + search?: (...args: any[]) => any[] | Promise + filter?: (...args: any[]) => Command[] static?: Boolean [key: string]: any } diff --git a/src/runtime/types/dropdown.ts b/src/runtime/types/dropdown.ts index 67dad14e..4b1a0d31 100644 --- a/src/runtime/types/dropdown.ts +++ b/src/runtime/types/dropdown.ts @@ -11,5 +11,5 @@ export interface DropdownItem extends NuxtLinkProps { shortcuts?: string[] disabled?: boolean class?: string - click?: Function + click?: (...args: any[]) => void } diff --git a/src/runtime/types/horizontal-navigation.ts b/src/runtime/types/horizontal-navigation.ts index ac50b2ee..3eca61bd 100644 --- a/src/runtime/types/horizontal-navigation.ts +++ b/src/runtime/types/horizontal-navigation.ts @@ -8,6 +8,6 @@ export interface HorizontalNavigationLink extends Link { icon?: string iconClass?: string avatar?: Avatar - click?: Function + click?: (...args: any[]) => void badge?: string | number | Badge } diff --git a/src/runtime/types/notification.ts b/src/runtime/types/notification.ts index 08cbdf95..8dc9cca1 100644 --- a/src/runtime/types/notification.ts +++ b/src/runtime/types/notification.ts @@ -5,7 +5,7 @@ import colors from '#ui-colors' export type NotificationColor = 'gray' | typeof colors[number] export interface NotificationAction extends Button { - click?: Function + click?: (...args: any[]) => void } export interface Notification { @@ -17,8 +17,8 @@ export interface Notification { closeButton?: Button timeout: number actions?: NotificationAction[] - click?: Function - callback?: Function + click?: (...args: any[]) => void + callback?: (...args: any[]) => void color?: NotificationColor ui?: any } diff --git a/src/runtime/types/vertical-navigation.ts b/src/runtime/types/vertical-navigation.ts index 852484fb..cbc52673 100644 --- a/src/runtime/types/vertical-navigation.ts +++ b/src/runtime/types/vertical-navigation.ts @@ -8,6 +8,6 @@ export interface VerticalNavigationLink extends Link { icon?: string iconClass?: string avatar?: Avatar - click?: Function + click?: (...args: any[]) => void badge?: string | number | Badge }