Skip to content
This repository was archived by the owner on Sep 20, 2024. It is now read-only.

Commit e6243ba

Browse files
committed
feat(core): add global components type (intellisense support) for Volar
1 parent 22e12ce commit e6243ba

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

packages/core/src/components.ts

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
/**
2+
* TypeScript support for auto-imported components using `vite-plugin-components`:
3+
* see: https://github.com/antfu/vite-plugin-components#typescript
4+
*/
5+
6+
declare module 'vue' {
7+
export interface GlobalComponents {
8+
CAspectRatio: typeof import('@chakra-ui/vue-next')['CAspectRatio']
9+
CBadge: typeof import('@chakra-ui/vue-next')['CBadge']
10+
CBox: typeof import('@chakra-ui/vue-next')['CBox']
11+
CCircle: typeof import('@chakra-ui/vue-next')['CCircle']
12+
CSquare: typeof import('@chakra-ui/vue-next')['CSquare']
13+
}
14+
}
15+
16+
export {}

packages/core/src/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,3 +114,5 @@ export * from '@chakra-ui/c-theme-provider'
114114

115115
// V
116116
export * from '@chakra-ui/c-visually-hidden'
117+
118+
export * from './components'

0 commit comments

Comments
 (0)