t-fighting-design
Version:
Fighting design can quickly build interactive interfaces in vue3 applications, which looks good.
26 lines (20 loc) • 692 B
TypeScript
import type { ComponentInternalInstance } from 'vue'
import type { NotificationPropsType } from '../notification/src/props'
import type { NotificationType } from '../notification/src/interface'
export type InstanceOptions<T> = Partial<Mutable<T>> & {
onDestroy?: () => void
}
export interface NotificationInstance {
visible: number
bottom: number
id: string
vm: ComponentInternalInstance
close: () => void
}
export type NotificationFnWithType = {
[key in NotificationType]: (text: string) => void
}
export type NotificationOptions = InstanceOptions<NotificationPropsType>
export interface FNotificationFn {
(options: NotificationOptions | string): NotificationInstance
}