index.d.ts 660 Bytes
declare interface ComponentElRef<T extends HTMLElement = HTMLDivElement> {
  $el: T
}

declare type ComponentRef<T extends HTMLElement = HTMLDivElement> = ComponentElRef<T> | null

declare type ElRef<T extends HTMLElement = HTMLDivElement> = Nullable<T>

declare type EmitType = (event: string, ...args: any[]) => void

declare type RefType<T> = T | null
/**
 * 任意类型的异步函数
 */
declare type AnyPromiseFunction = (...arg: any[]) => PromiseLike<any>

/**
 * 任意类型的普通函数
 */
declare type AnyNormalFunction = (...arg: any[]) => any

/**
 * 任意类型的函数
 */
declare type AnyFunction = AnyNormalFunction | AnyPromiseFunction