chore(types): use (...args: any[]) => void instead of Function

This commit is contained in:
Benjamin Canac
2024-07-25 12:44:07 +02:00
parent 503885a5fe
commit 64c38cb35e
6 changed files with 9 additions and 9 deletions

View File

@@ -8,5 +8,5 @@ export type AlertColor = keyof typeof alert.color | ExtractDeepKey<AppConfig, ['
export type AlertVariant = keyof typeof alert.variant | ExtractDeepKey<AppConfig, ['ui', 'alert', 'variant']> | NestedKeyOf<typeof alert.color> | NestedKeyOf<ExtractDeepObject<AppConfig, ['ui', 'alert', 'color']>> export type AlertVariant = keyof typeof alert.variant | ExtractDeepKey<AppConfig, ['ui', 'alert', 'variant']> | NestedKeyOf<typeof alert.color> | NestedKeyOf<ExtractDeepObject<AppConfig, ['ui', 'alert', 'color']>>
export interface AlertAction extends Button { export interface AlertAction extends Button {
click?: Function click?: (...args: any[]) => void
} }

View File

@@ -22,8 +22,8 @@ export interface Group {
active?: string active?: string
inactive?: string inactive?: string
commands?: Command[] commands?: Command[]
search?: Function search?: (...args: any[]) => any[] | Promise<any[]>
filter?: Function filter?: (...args: any[]) => Command[]
static?: Boolean static?: Boolean
[key: string]: any [key: string]: any
} }

View File

@@ -11,5 +11,5 @@ export interface DropdownItem extends NuxtLinkProps {
shortcuts?: string[] shortcuts?: string[]
disabled?: boolean disabled?: boolean
class?: string class?: string
click?: Function click?: (...args: any[]) => void
} }

View File

@@ -8,6 +8,6 @@ export interface HorizontalNavigationLink extends Link {
icon?: string icon?: string
iconClass?: string iconClass?: string
avatar?: Avatar avatar?: Avatar
click?: Function click?: (...args: any[]) => void
badge?: string | number | Badge badge?: string | number | Badge
} }

View File

@@ -5,7 +5,7 @@ import colors from '#ui-colors'
export type NotificationColor = 'gray' | typeof colors[number] export type NotificationColor = 'gray' | typeof colors[number]
export interface NotificationAction extends Button { export interface NotificationAction extends Button {
click?: Function click?: (...args: any[]) => void
} }
export interface Notification { export interface Notification {
@@ -17,8 +17,8 @@ export interface Notification {
closeButton?: Button closeButton?: Button
timeout: number timeout: number
actions?: NotificationAction[] actions?: NotificationAction[]
click?: Function click?: (...args: any[]) => void
callback?: Function callback?: (...args: any[]) => void
color?: NotificationColor color?: NotificationColor
ui?: any ui?: any
} }

View File

@@ -8,6 +8,6 @@ export interface VerticalNavigationLink extends Link {
icon?: string icon?: string
iconClass?: string iconClass?: string
avatar?: Avatar avatar?: Avatar
click?: Function click?: (...args: any[]) => void
badge?: string | number | Badge badge?: string | number | Badge
} }