types: add vue sfc shim (#8131)

This commit is contained in:
neverland
2021-02-11 11:32:44 +08:00
committed by GitHub
parent 015be0ee70
commit a41b2c03bd
2 changed files with 6 additions and 0 deletions

18
src/vue-tsx-shim.d.ts vendored Normal file
View File

@@ -0,0 +1,18 @@
import 'vue';
type EventHandler = (...args: any[]) => void;
// TODO
// should be removed after Vue supported component events typing
// see: https://github.com/vuejs/vue-next/issues/1553
// https://github.com/vuejs/vue-next/issues/3029
declare module 'vue' {
interface ComponentCustomProps {
role?: string;
tabindex?: number;
onClick?: EventHandler;
onClosed?: EventHandler;
onChange?: EventHandler;
onToggle?: EventHandler;
}
}