diff --git a/packages/runtime-core/src/apiOptions.ts b/packages/runtime-core/src/apiOptions.ts index 2dea6eef..b50165a2 100644 --- a/packages/runtime-core/src/apiOptions.ts +++ b/packages/runtime-core/src/apiOptions.ts @@ -3,7 +3,8 @@ import { Data, Component, SetupContext, - RenderFunction + RenderFunction, + SFCInternalOptions } from './component' import { isFunction, @@ -48,7 +49,7 @@ export interface ComponentOptionsBase< D, C extends ComputedOptions, M extends MethodOptions -> extends LegacyOptions { +> extends LegacyOptions, SFCInternalOptions { setup?: ( this: null, props: Props, @@ -66,11 +67,6 @@ export interface ComponentOptionsBase< directives?: Record inheritAttrs?: boolean - // SFC & dev only - __scopeId?: string - __hmrId?: string - __hmrUpdated?: boolean - // type-only differentiator to separate OptionWithoutProps from a constructor // type returned by createComponent() or FunctionalComponent call?: never diff --git a/packages/runtime-core/src/component.ts b/packages/runtime-core/src/component.ts index 4825d873..e2658142 100644 --- a/packages/runtime-core/src/component.ts +++ b/packages/runtime-core/src/component.ts @@ -32,15 +32,17 @@ import { currentRenderingInstance } from './componentRenderUtils' export type Data = { [key: string]: unknown } -export interface FunctionalComponent

{ +export interface SFCInternalOptions { + __scopeId?: string + __hmrId?: string + __hmrUpdated?: boolean +} + +export interface FunctionalComponent

extends SFCInternalOptions { (props: P, ctx: SetupContext): VNodeChild props?: ComponentPropsOptions

inheritAttrs?: boolean displayName?: string - - // internal HMR related flags - __hmrId?: string - __hmrUpdated?: boolean } export type Component = ComponentOptions | FunctionalComponent