mirror of
https://github.com/youzan/vant.git
synced 2026-05-08 01:07:46 +08:00
types: add onClick event shim (#8665)
This commit is contained in:
@@ -1,9 +1,18 @@
|
||||
import { App } from 'vue';
|
||||
import { camelize } from './format/string';
|
||||
|
||||
// https://github.com/youzan/vant/issues/8302
|
||||
type EventShim = {
|
||||
new (...args: any[]): {
|
||||
$props: {
|
||||
onClick?: (...args: any[]) => void;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
export type WithInstall<T> = T & {
|
||||
install(app: App): void;
|
||||
};
|
||||
} & EventShim;
|
||||
|
||||
// using any here because tsc will generate some weird results when using generics
|
||||
export function withInstall<T>(options: any): WithInstall<T> {
|
||||
|
||||
Reference in New Issue
Block a user