-
-
Notifications
You must be signed in to change notification settings - Fork 366
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
如何配置指定名称的组件才在components.d.ts文件中生成类型声明 #420
Comments
currently you can't do this |
I also want this feature because I don't want type declarations provided by Vue2 UI library (all the component types are |
I also want this feature too. |
您好,请问有解决办法了吗?我也有这个困惑 |
@lishaobos 大佬你这个pr怎么使用啊 |
就是和 glob 规则一样,你最开始加个 ! , 例如:!src/xx.vue |
@lishaobos |
这个 globs 里面可以写多个,你写了一个排除,可以再写几个命中,类似于下面
|
使用这种方式来排除 |
例如,有如下组件目录结构:
这样
index.vue
、child-a.vue
、child-b.vue
都会生成类型声明,但实际上child-a
和child-b
组件作为component-a
组件的子组件,并不需要单独对外暴露的,而且child-a.vue
、child-b.vue
还有可能与其它组件重名,有没有办法只匹配到名字为index
的组件才生成类型声明,尝试了include
属性,好像没效果The text was updated successfully, but these errors were encountered: