vue-vben-admin/types/index.d.ts

28 lines
657 B
TypeScript
Raw Normal View History

2021-03-26 22:22:58 +08:00
declare interface Fn<T = any, R = T> {
(...arg: T[]): R;
}
declare interface PromiseFn<T = any, R = T> {
(...arg: T[]): Promise<R>;
}
declare type RefType<T> = T | null;
declare type LabelValueOptions = {
label: string;
value: any;
2021-06-19 22:38:29 +08:00
[key: string]: string | number | boolean;
2021-03-26 22:22:58 +08:00
}[];
declare type EmitType = ReturnType<typeof defineEmits>;
2021-03-26 22:22:58 +08:00
declare type TargetContext = '_self' | '_blank';
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>;