index.d.ts 687 B

12345678910111213141516171819202122232425262728
  1. declare interface Fn<T = any, R = T> {
  2. (...arg: T[]): R;
  3. }
  4. declare interface PromiseFn<T = any, R = T> {
  5. (...arg: T[]): Promise<R>;
  6. }
  7. declare type RefType<T> = T | null;
  8. declare type LabelValueOptions = {
  9. label: string;
  10. value: any;
  11. disabled: boolean;
  12. [key: string]: string | number | boolean;
  13. }[];
  14. declare type EmitType = (event: string, ...args: any[]) => void;
  15. declare type TargetContext = '_self' | '_blank';
  16. declare interface ComponentElRef<T extends HTMLElement = HTMLDivElement> {
  17. $el: T;
  18. }
  19. declare type ComponentRef<T extends HTMLElement = HTMLDivElement> = ComponentElRef<T> | null;
  20. declare type ElRef<T extends HTMLElement = HTMLDivElement> = Nullable<T>;