vant-weapp/types/index.d.ts
2018-09-18 17:22:49 +08:00

24 lines
543 B
TypeScript

type Mixins = any[];
type Relations = object;
type ExternalClasses = string[];
export interface Vue {
$emit(name: string, detail?: any): void;
}
export type VantComponentOptions<Props, Data, Methods> = {
data?: Data;
props?: Props;
field?: boolean;
mixins?: Mixins;
relations?: Relations;
classes?: ExternalClasses;
methods?: Methods & ThisType<Vue & Weapp.Component & { data: Data & Props } & Methods>;
// lifetimes
beforeCreate?: () => void;
created?: () => void;
mounted?: () => void;
destroyed?: () => void;
}