11import { resolveConfig } from 'vue-global-config'
2- import type { App , Component } from 'vue-demi'
3- import component from './component '
4- import type { Mode } from './component '
2+ import type { App } from 'vue-demi'
3+ import Component from './Component '
4+ import type { Mode } from './Component '
55
66const globalProps : Record < keyof any , any > = { }
77const globalAttrs : Record < keyof any , any > = { }
88
9- type SFCWithInstall = Component & {
9+ type SFCWithInstall = typeof Component & {
1010 install : ( app : App , options ?: Record < keyof any , any > ) => void
1111}
1212
13- function withInstall ( sfc : Component ) : SFCWithInstall {
13+ function withInstall ( sfc : typeof Component ) : SFCWithInstall {
1414 ( sfc as SFCWithInstall ) . install = ( app : App , options = { } ) : void => {
15- const { props, attrs } = resolveConfig ( options , component . props )
15+ const { props, attrs } = resolveConfig ( options , Component . props )
1616 Object . assign ( globalProps , props )
1717 Object . assign ( globalAttrs , attrs )
1818 app . component ( sfc . name as string , sfc as Object )
@@ -22,4 +22,4 @@ function withInstall(sfc: Component): SFCWithInstall {
2222}
2323
2424export { globalProps , globalAttrs , Mode }
25- export default withInstall ( component )
25+ export default withInstall ( Component )
0 commit comments