Prechádzať zdrojové kódy

feat: 添加 shims-uni.d.ts 文件,扩展 Vue 组件自定义选项类型

EvilDragon 3 mesiacov pred
rodič
commit
fd17634545

+ 0 - 0
packages/ui/tsconfig.json


+ 8 - 0
packages/ui/types/shims-uni.d.ts

@@ -0,0 +1,8 @@
+/// <reference types='@dcloudio/types' />
+import 'vue'
+
+declare module '@vue/runtime-core' {
+  type Hooks = App.AppInstance & Page.PageInstance
+
+  interface ComponentCustomOptions extends Hooks {}
+}