1
1
import {
2
2
type Component ,
3
3
type ConcreteComponent ,
4
+ type Data ,
4
5
type GenericComponent ,
5
6
type GenericComponentInstance ,
6
7
getComponentPublicInstance ,
@@ -22,7 +23,6 @@ import { warn } from './warning'
22
23
import type { VNode } from './vnode'
23
24
import { devtoolsInitApp , devtoolsUnmountApp } from './devtools'
24
25
import { NO , extend , isFunction , isObject } from '@vue/shared'
25
- import type { Data } from '@vue/runtime-shared'
26
26
import { version } from '.'
27
27
import { installAppCompatProperties } from './compat/global'
28
28
import type { NormalizedPropsOptions } from './componentProps'
@@ -256,8 +256,8 @@ export function createAppContext(): AppContext {
256
256
}
257
257
}
258
258
259
- export type CreateAppFunction < HostElement > = (
260
- rootComponent : GenericComponent ,
259
+ export type CreateAppFunction < HostElement , Comp = Component > = (
260
+ rootComponent : Comp ,
261
261
rootProps ?: Data | null ,
262
262
) => App < HostElement >
263
263
@@ -275,13 +275,13 @@ export type AppUnmountFn = (app: App) => void
275
275
/**
276
276
* @internal
277
277
*/
278
- export function createAppAPI < HostElement > (
278
+ export function createAppAPI < HostElement , Comp = Component > (
279
279
// render: RootRenderFunction<HostElement>,
280
280
// hydrate?: RootHydrateFunction,
281
281
mount : AppMountFn < HostElement > ,
282
282
unmount : AppUnmountFn ,
283
283
render ?: RootRenderFunction ,
284
- ) : CreateAppFunction < HostElement > {
284
+ ) : CreateAppFunction < HostElement , Comp > {
285
285
return function createApp ( rootComponent , rootProps = null ) {
286
286
if ( ! isFunction ( rootComponent ) ) {
287
287
rootComponent = extend ( { } , rootComponent )
0 commit comments