index.d.ts 666 B

123456789101112131415161718192021222324252627
  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. [key: string]: string | number | boolean;
  12. }[];
  13. declare type EmitType = (event: string, ...args: any[]) => void;
  14. declare type TargetContext = '_self' | '_blank';
  15. declare interface ComponentElRef<T extends HTMLElement = HTMLDivElement> {
  16. $el: T;
  17. }
  18. declare type ComponentRef<T extends HTMLElement = HTMLDivElement> = ComponentElRef<T> | null;
  19. declare type ElRef<T extends HTMLElement = HTMLDivElement> = Nullable<T>;