Skip to content

Commit d59c0cb

Browse files
committed
feat: add component instance types
1 parent cc16267 commit d59c0cb

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
},
3232
"./*": "./*",
3333
"./volar": "./dist/volar.d.ts",
34-
"./style": "./dist/es/style.css"
34+
"./style": "./dist/es/styles.css"
3535
},
3636
"main": "dist/lib/index.js",
3737
"module": "dist/es/index.js",

src/index.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ import { createInstaller } from './utils/installer'
44
export * from './components'
55
export * from './resolver'
66

7-
export const install = createInstaller(components)
7+
const installer = createInstaller(components)
88

9-
export default install
9+
export const install = installer.install
10+
11+
export default installer

src/say-hello/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
import { installWithSFC } from '../utils'
22
import SayHello from './SayHello.vue'
33

4+
export type SayHelloInstance = InstanceType<typeof SayHello>
5+
46
export const StSayHello = installWithSFC(SayHello)
57

68
export default StSayHello

0 commit comments

Comments
 (0)