Backtestsvuerun-20261009-161443#15096

Issue #15096 Merged fix PR #15097 Run 9 Oct 2026 · run-20261009-161443 vuejs/core

defineModel: named model with PropType + factory default infers wrong generic (regression from #14968)

Better

Our patch was judged better than the merged fix.

In this judgment, Patch B = our agent, Patch A = the merged fix.

Correctness is the deciding factor. Patch B fixes the root cause. It adds dedicated overloads (both the unnamed and the named `defineModel` forms) where `type: PropType<T>` is the only inference site for `T`. Those overloads check `default` against `DefineModelDefault<NoInfer<T>>`, so a factory such as `() => []` can no longer become an inference candidate for `T`. That directly addresses the regression the issue describes. Vue's type surface already uses `NoInfer` elsewhere (e.g. `App.use`), so it adds no new TypeScript-version requirement. B's tests cover the reported case (named array with factory default), the unnamed form, object and primitive defaults, the explicit-generic path, and negative cases (wrong factory return type, raw array default, wrong primitive default). Patch A only swaps the order of the intersection members in the existing overloads. Any effect comes from TypeScript's candidate ordering and common-supertype selection, not from a structural guarantee. Even if A's added tests pass, the fix is fragile and could break with compiler changes or other option shapes. The main point against B is a large amount of unrelated churn: dozens of generated `.d.ts` files committed into `src` directories across compiler-core, reactivity, runtime-core and shared, many omitted for size. These are clutter and a maintenance risk (stale declarations next to sources), but they don't affect the logic of the fix, and `.ts` sources take precedence in resolution. My confidence is limited by not seeing the omitted files, though they appear to be the same kind of emitted declarations. On balance, B's sound, well-tested fix outweighs A's minimal but speculative reorder; B should drop the stray `.d.ts` files before merging.

The judge saw only the two patches, labelled A and B in random order, with issue links and version numbers removed. The reasoning above is shown verbatim.

Solve

7m 19s

Wall-clock time in the container

Full test suite

No new failures

3,626 passed · 6 skipped · 3,632 total

Contamination audit

Clean

No sign the agent saw the real fix

Patch size

5,893vs 26 merged

Changed lines, ours vs merged

Vue version

3.5.39

Link to minimal reproduction

https://play.vuejs.org/#eNqtk81qGzEQx19l0MUJmDXUTaGLbUhKDi20DY1JD1Gold3ZjWJZEvpwbcwee+sjtC/XJ+lIi50EQk65rWb+M/Obj92xU2uLdURWsomvnLQBPIZoQQndTjkLnrMZ13JljQsQthZhBxfO2Hn67KBxZgUDSjDgmuvRCP79/Q1nsS1hfglSN+g8zHtVuENY1NiIqMICGlEF47Ygg0fVkNQHFDWYBhapymKYs1UieqlbEOBtdNJE3zOgc8YBuSqEq4gwLk6K8fuC68pQIrh1ZokapkDlpMbPpkZ1NFhLL2+lkmE7GMKOa8i5Sjh1TmxB+ENfEx8cVb2+mREFpCSJuYSjY5jO4PqGrN3xvt8/v+C7cUvhTNR1CVbq3GmLGp2sADdWyUoGtd3DNXKD9VO2h4KPKd+8DuZk1C+W1kiPgCurREB6AUxquZ7tdvt5dR3Qo+fruskoeVP8IYYN6SCoi0a2xb03mq4mA3JWmZWVCt1XGyR1yVnZoyefUMr8/JRtwUXMsDnmDqvlM/Z7v0k2zi4cenRr5OzgC8K1GHr3+eUX3ND3wbkydVSkfsH5Db1RMTH2sjNaGmE/0mXaj/neabhzf74JqP2+qQSalF3Wc0aX/+GF1h9wx8XbHEc7oSn+WNOPQWoaYH+6yRb81cF6Urwrxqz7D9k1OqM=

Steps to reproduce

In the reproduction, broken declares a named model with a runtime type: PropType<string[]> plus a factory default: () => []. fixed declares the same thing but with the generic pinned explicitly (defineModel<string[]>(...)).

Run the type checker (or vue-tsc --noEmit locally) over this SFC.

What is expected?

Both broken and fixed should type-check cleanly — this is the recommended pattern for avoiding shared mutable state (per #14966 / #14968): a factory default combined with a runtime PropType declaration.

What is actually happening?

Only broken fails. TS infers the generic T from the default factory function's own type (() => never[]) instead of from the type: PropType<string[]> field:

error TS2769: No overload matches this call.
Overload 1 of 4, '(name: string, options: ({ required: true; } | { default: DefineModelDefault<() => never[]>; }) & Omit<PropOptions<() => never[], () => never[]>, "default"> & DefineModelOptions<...>): ModelRef<...>', gave the following error.
Type 'PropType<string[]>' is not assignable to type 'true | PropType<() => never[]> | null | undefined'.
Type 'new (...args: any[]) => string[]' is not assignable to type 'true | PropType<() => never[]> | null | undefined'.
Type 'new (...args: any[]) => string[]' is not assignable to type 'new (...args: any[]) => () => never[]'.
Type 'string[]' is not assignable to type '() => never[]'.
Type 'string[]' provides no match for the signature '(): never[]'.
Overload 2 of 4, '(name: string, options?: DefineModelRuntimeOptions<string[], string[], string[]> | undefined): ModelRef<string[] | undefined, string, string[] | undefined, string[] | undefined>', gave the following error.
Object literal may only specify known properties, and 'default' does not exist in type 'DefineModelRuntimeOptions<string[], string[], string[]>'.

his is a regression from #14968 (landed in 3.5.39), which introduced DefineModelDefault<T> = InferDefault<Data, T> for the named-model overload. When both a runtime type: PropType<T> field and a factory default are present on the same options object, TS resolves T from the default field first, breaking a pattern that worked prior to 3.5.39.

Workaround: explicitly pin the generic, as shown by fixed in the reproduction:

const fixed = defineModel<string[]>('visibility2', {
  type: Array as PropType<string[]>,
  default: () => [],
})

System Info

vue: 3.5.39
vue-tsc: 3.3.7
typescript: 5.7.3

Any additional comments?

Related to / regression from #14966 and #14968. Only reproduces on the named defineModel(name, options) overload when type/PropType and a factory default are combined; the unnamed defineModel<T>({ ... }) form with an explicit generic is unaffected.

The two patches

Our patch+5893 −0
packages-private/dts-test/setupHelpers.test-d.tsindex 5ecc15443..f93157fe0 100644@@ -1,4 +1,5 @@ import {+  type PropType,   type Ref,   type Slots,   type VNode,@@ -466,6 +467,43 @@ describe('defineModel', () => {     },   }) +  // #15096 runtime PropType + factory default should infer from `type`+  const typedArrayDefault = defineModel({+    type: Array as PropType<string[]>,+    default: () => [],+  })+  expectType<Ref<string[]>>(typedArrayDefault)+  const namedTypedArrayDefault = defineModel('visibility', {+    type: Array as PropType<string[]>,+    default: () => [],+  })+  expectType<Ref<string[]>>(namedTypedArrayDefault)+  const namedTypedObjectDefault = defineModel('obj', {+    type: Object as PropType<{ foo: string }>,+    default: () => ({ foo: 'bar' }),+  })+  expectType<Ref<{ foo: string }>>(namedTypedObjectDefault)+  const namedTypedPrimitiveDefault = defineModel('count', {+    type: Number,+    default: 1,+  })+  expectType<Ref<number>>(namedTypedPrimitiveDefault)+  // explicit generic still works+  const namedPinnedArrayDefault = defineModel<string[]>('visibility2', {+    type: Array as PropType<string[]>,+    default: () => [],+  })+  expectType<Ref<string[]>>(namedPinnedArrayDefault)+  // @ts-expect-error factory default must match runtime type+  defineModel('visibility3', {+    type: Array as PropType<string[]>,+    default: () => [1],+  })+  // @ts-expect-error raw array defaults must use a factory+  defineModel('visibility4', { type: Array as PropType<string[]>, default: [] })+  // @ts-expect-error primitive default must match runtime type+  defineModel('count2', { type: Number, default: 'foo' })+   // @ts-expect-error type / default mismatch   defineModel<string>({ default: 123 })   // @ts-expect-error raw array defaults must use a factorypackages/compiler-core/src/ast.d.tsnew file mode 100644index 000000000..2a266da6e@@ -0,0 +1,435 @@+import { type PatchFlags } from '@vue/shared';+import { CREATE_BLOCK, CREATE_ELEMENT_BLOCK, CREATE_ELEMENT_VNODE, type CREATE_SLOTS, CREATE_VNODE, type FRAGMENT, type RENDER_LIST, type RENDER_SLOT, type WITH_MEMO } from './runtimeHelpers';+import type { PropsExpression } from './transforms/transformElement';+import type { ImportItem, TransformContext } from './transform';+import type { Node as BabelNode } from '@babel/types';+export type Namespace = number;+export declare enum Namespaces {+    HTML = 0,+    SVG = 1,+    MATH_ML = 2+}+export declare enum NodeTypes {+    ROOT = 0,+    ELEMENT = 1,+    TEXT = 2,+    COMMENT = 3,+    SIMPLE_EXPRESSION = 4,+    INTERPOLATION = 5,+    ATTRIBUTE = 6,+    DIRECTIVE = 7,+    COMPOUND_EXPRESSION = 8,+    IF = 9,+    IF_BRANCH = 10,+    FOR = 11,+    TEXT_CALL = 12,+    VNODE_CALL = 13,+    JS_CALL_EXPRESSION = 14,+    JS_OBJECT_EXPRESSION = 15,+    JS_PROPERTY = 16,+    JS_ARRAY_EXPRESSION = 17,+    JS_FUNCTION_EXPRESSION = 18,+    JS_CONDITIONAL_EXPRESSION = 19,+    JS_CACHE_EXPRESSION = 20,+    JS_BLOCK_STATEMENT = 21,+    JS_TEMPLATE_LITERAL = 22,+    JS_IF_STATEMENT = 23,+    JS_ASSIGNMENT_EXPRESSION = 24,+    JS_SEQUENCE_EXPRESSION = 25,+    JS_RETURN_STATEMENT = 26+}+export declare enum ElementTypes {+    ELEMENT = 0,+    COMPONENT = 1,+    SLOT = 2,+    TEMPLATE = 3+}+export interface Node {+    type: NodeTypes;+    loc: SourceLocation;+}+export interface SourceLocation {+    start: Position;+    end: Position;+    source: string;+}+export interface Position {+    offset: number;+    line: number;+    column: number;+}+export type ParentNode = RootNode | ElementNode | IfBranchNode | ForNode;+export type ExpressionNode = SimpleExpressionNode | CompoundExpressionNode;+export type TemplateChildNode = ElementNode | InterpolationNode | CompoundExpressionNode | TextNode | CommentNode | IfNode | IfBranchNode | ForNode | TextCallNode;+export interface RootNode extends Node {+    type: NodeTypes.ROOT;+    source: string;+    children: TemplateChildNode[];+    helpers: Set<symbol>;+    components: string[];+    directives: string[];+    hoists: (JSChildNode | null)[];+    imports: ImportItem[];+    cached: (CacheExpression | null)[];+    temps: number;+    ssrHelpers?: symbol[];+    codegenNode?: TemplateChildNode | JSChildNode | BlockStatement;+    transformed?: boolean;+    filters?: string[];+}+export type ElementNode = PlainElementNode | ComponentNode | SlotOutletNode | TemplateNode;+export interface BaseElementNode extends Node {+    type: NodeTypes.ELEMENT;+    ns: Namespace;+    tag: string;+    tagType: ElementTypes;+    props: Array<AttributeNode | DirectiveNode>;+    children: TemplateChildNode[];+    isSelfClosing?: boolean;+    innerLoc?: SourceLocation;+}+export interface PlainElementNode extends BaseElementNode {+    tagType: ElementTypes.ELEMENT;+    codegenNode: VNodeCall | SimpleExpressionNode | CacheExpression | MemoExpression | undefined;+    ssrCodegenNode?: TemplateLiteral;+}+export interface ComponentNode extends BaseElementNode {+    tagType: ElementTypes.COMPONENT;+    codegenNode: VNodeCall | CacheExpression | MemoExpression | undefined;+    ssrCodegenNode?: CallExpression;+}+export interface SlotOutletNode extends BaseElementNode {+    tagType: ElementTypes.SLOT;+    codegenNode: RenderSlotCall | CacheExpression | undefined;+    ssrCodegenNode?: CallExpression;+}+export interface TemplateNode extends BaseElementNode {+    tagType: ElementTypes.TEMPLATE;+    codegenNode: undefined;+}+export interface TextNode extends Node {+    type: NodeTypes.TEXT;+    content: string;+}+export interface CommentNode extends Node {+    type: NodeTypes.COMMENT;+    content: string;+}+export interface AttributeNode extends Node {+    type: NodeTypes.ATTRIBUTE;+    name: string;+    nameLoc: SourceLocation;+    value: TextNode | undefined;+}+export interface DirectiveNode extends Node {+    type: NodeTypes.DIRECTIVE;+    /**+     * the normalized name without prefix or shorthands, e.g. "bind", "on"+     */+    name: string;+    /**+     * the raw attribute name, preserving shorthand, and including arg & modifiers+     * this is only used during parse.+     */+    rawName?: string;+    exp: ExpressionNode | undefined;+    arg: ExpressionNode | undefined;+    modifiers: SimpleExpressionNode[];+    /**+     * optional property to cache the expression parse result for v-for+     */+    forParseResult?: ForParseResult;+}+/**+ * Static types have several levels.+ * Higher levels implies lower levels. e.g. a node that can be stringified+ * can always be hoisted and skipped for patch.+ */+export declare enum ConstantTypes {+    NOT_CONSTANT = 0,+    CAN_SKIP_PATCH = 1,+    CAN_CACHE = 2,+    CAN_STRINGIFY = 3+}+export interface SimpleExpressionNode extends Node {+    type: NodeTypes.SIMPLE_EXPRESSION;+    content: string;+    isStatic: boolean;+    constType: ConstantTypes;+    /**+     * - `null` means the expression is a simple identifier that doesn't need+     *    parsing+     * - `false` means there was a parsing error+     */+    ast?: BabelNode | null | false;+    /**+     * Indicates this is an identifier for a hoist vnode call and points to the+     * hoisted node.+     */+    hoisted?: JSChildNode;+    /**+     * an expression parsed as the params of a function will track+     * the identifiers declared inside the function body.+     */+    identifiers?: string[];+    isHandlerKey?: boolean;+}+export interface InterpolationNode extends Node {+    type: NodeTypes.INTERPOLATION;+    content: ExpressionNode;+}+export interface CompoundExpressionNode extends Node {+    type: NodeTypes.COMPOUND_EXPRESSION;+    /**+     * - `null` means the expression is a simple identifier that doesn't need+     *    parsing+     * - `false` means there was a parsing error+     */+    ast?: BabelNode | null | false;+    children: (SimpleExpressionNode | CompoundExpressionNode | InterpolationNode | TextNode | string | symbol)[];+    /**+     * an expression parsed as the params of a function will track+     * the identifiers declared inside the function body.+     */+    identifiers?: string[];+    isHandlerKey?: boolean;+}+export interface IfNode extends Node {+    type: NodeTypes.IF;+    branches: IfBranchNode[];+    codegenNode?: IfConditionalExpression | CacheExpression;+}+export interface IfBranchNode extends Node {+    type: NodeTypes.IF_BRANCH;+    condition: ExpressionNode | undefined;+    children: TemplateChildNode[];+    userKey?: AttributeNode | DirectiveNode;+    isTemplateIf?: boolean;+}+export interface ForNode extends Node {+    type: NodeTypes.FOR;+    source: ExpressionNode;+    valueAlias: ExpressionNode | undefined;+    keyAlias: ExpressionNode | undefined;+    objectIndexAlias: ExpressionNode | undefined;+    parseResult: ForParseResult;+    children: TemplateChildNode[];+    codegenNode?: ForCodegenNode;+}+export interface ForParseResult {+    source: ExpressionNode;+    value: ExpressionNode | undefined;+    key: ExpressionNode | undefined;+    index: ExpressionNode | undefined;+    finalized: boolean;+}+export interface TextCallNode extends Node {+    type: NodeTypes.TEXT_CALL;+    content: TextNode | InterpolationNode | CompoundExpressionNode;+    codegenNode: CallExpression | SimpleExpressionNode;+}+export type TemplateTextChildNode = TextNode | InterpolationNode | CompoundExpressionNode;+export interface VNodeCall extends Node {+    type: NodeTypes.VNODE_CALL;+    tag: string | symbol | CallExpression;+    props: PropsExpression | undefined;+    children: TemplateChildNode[] | TemplateTextChildNode | SlotsExpression | ForRenderListExpression | SimpleExpressionNode | CacheExpression | undefined;+    patchFlag: PatchFlags | undefined;+    dynamicProps: string | SimpleExpressionNode | undefined;+    directives: DirectiveArguments | undefined;+    isBlock: boolean;+    disableTracking: boolean;+    isComponent: boolean;+}+export type JSChildNode = VNodeCall | CallExpression | ObjectExpression | ArrayExpression | ExpressionNode | FunctionExpression | ConditionalExpression | CacheExpression | AssignmentExpression | SequenceExpression;+export interface CallExpression extends Node {+    type: NodeTypes.JS_CALL_EXPRESSION;+    callee: string | symbol;+    arguments: (string | symbol | JSChildNode | SSRCodegenNode | TemplateChildNode | TemplateChildNode[])[];+}+export interface ObjectExpression extends Node {+    type: NodeTypes.JS_OBJECT_EXPRESSION;+    properties: Array<Property>;+}+export interface Property extends Node {+    type: NodeTypes.JS_PROPERTY;+    key: ExpressionNode;+    value: JSChildNode;+}+export interface ArrayExpression extends Node {+    type: NodeTypes.JS_ARRAY_EXPRESSION;+    elements: Array<string | Node>;+}+export interface FunctionExpression extends Node {+    type: NodeTypes.JS_FUNCTION_EXPRESSION;+    params: ExpressionNode | string | (ExpressionNode | string)[] | undefined;+    returns?: TemplateChildNode | TemplateChildNode[] | JSChildNode;+    body?: BlockStatement | IfStatement;+    newline: boolean;+    /**+     * This flag is for codegen to determine whether it needs to generate the+     * withScopeId() wrapper+     */+    isSlot: boolean;+    /**+     * __COMPAT__ only, indicates a slot function that should be excluded from+     * the legacy $scopedSlots instance property.+     */+    isNonScopedSlot?: boolean;+}+export interface ConditionalExpression extends Node {+    type: NodeTypes.JS_CONDITIONAL_EXPRESSION;+    test: JSChildNode;+    consequent: JSChildNode;+    alternate: JSChildNode;+    newline: boolean;+}+export interface CacheExpression extends Node {+    type: NodeTypes.JS_CACHE_EXPRESSION;+    index: number;+    value: JSChildNode;+    needPauseTracking: boolean;+    inVOnce: boolean;+    needArraySpread: boolean;+}+export interface MemoExpression extends CallExpression {+    callee: typeof WITH_MEMO;+    arguments: [ExpressionNode, MemoFactory, string, string];+}+interface MemoFactory extends FunctionExpression {+    returns: BlockCodegenNode;+}+export type SSRCodegenNode = BlockStatement | TemplateLiteral | IfStatement | AssignmentExpression | ReturnStatement | SequenceExpression;+export interface BlockStatement extends Node {+    type: NodeTypes.JS_BLOCK_STATEMENT;+    body: (JSChildNode | IfStatement)[];+}+export interface TemplateLiteral extends Node {+    type: NodeTypes.JS_TEMPLATE_LITERAL;+    elements: (string | JSChildNode)[];+}+export interface IfStatement extends Node {+    type: NodeTypes.JS_IF_STATEMENT;+    test: ExpressionNode;+    consequent: BlockStatement;+    alternate: IfStatement | BlockStatement | ReturnStatement | undefined;+}+export interface AssignmentExpression extends Node {+    type: NodeTypes.JS_ASSIGNMENT_EXPRESSION;+    left: SimpleExpressionNode;+    right: JSChildNode;+}+export interface SequenceExpression extends Node {+    type: NodeTypes.JS_SEQUENCE_EXPRESSION;+    expressions: JSChildNode[];+}+export interface ReturnStatement extends Node {+    type: NodeTypes.JS_RETURN_STATEMENT;+    returns: TemplateChildNode | TemplateChildNode[] | JSChildNode;+}+export interface DirectiveArguments extends ArrayExpression {+    elements: DirectiveArgumentNode[];+}+export interface DirectiveArgumentNode extends ArrayExpression {+    elements: [string] | [string, ExpressionNode] | [string, ExpressionNode, ExpressionNode] | [string, ExpressionNode, ExpressionNode, ObjectExpression];+}+export interface RenderSlotCall extends CallExpression {+    callee: typeof RENDER_SLOT;+    arguments: [string, string | ExpressionNode] | [string, string | ExpressionNode, PropsExpression | '{}'] | [+        string,+        string | ExpressionNode,+        PropsExpression | '{}',+        FunctionExpression | string+    ] | [+        string,+        string | ExpressionNode,+        PropsExpression | '{}',+        FunctionExpression | string,+        string+    ] | [+        string,+        string | ExpressionNode,+        PropsExpression | '{}',+        FunctionExpression | string,+        string,+        JSChildNode+    ];+}+export type SlotsExpression = SlotsObjectExpression | DynamicSlotsExpression;+export interface SlotsObjectExpression extends ObjectExpression {+    properties: SlotsObjectProperty[];+}+export interface SlotsObjectProperty extends Property {+    value: SlotFunctionExpression;+}+export interface SlotFunctionExpression extends FunctionExpression {+    returns: TemplateChildNode[] | CacheExpression;+}+export interface DynamicSlotsExpression extends CallExpression {+    callee: typeof CREATE_SLOTS;+    arguments: [SlotsObjectExpression, DynamicSlotEntries];+}+export interface DynamicSlotEntries extends ArrayExpression {+    elements: (ConditionalDynamicSlotNode | ListDynamicSlotNode)[];+}+export interface ConditionalDynamicSlotNode extends ConditionalExpression {+    consequent: DynamicSlotNode;+    alternate: DynamicSlotNode | SimpleExpressionNode;+}+export interface ListDynamicSlotNode extends CallExpression {+    callee: typeof RENDER_LIST;+    arguments: [ExpressionNode, ListDynamicSlotIterator];+}+export interface ListDynamicSlotIterator extends FunctionExpression {+    returns: DynamicSlotNode;+}+export interface DynamicSlotNode extends ObjectExpression {+    properties: [Property, DynamicSlotFnProperty];+}+export interface DynamicSlotFnProperty extends Property {+    value: SlotFunctionExpression;+}+export type BlockCodegenNode = VNodeCall | RenderSlotCall;+export interface IfConditionalExpression extends ConditionalExpression {+    consequent: BlockCodegenNode | MemoExpression;+    alternate: BlockCodegenNode | IfConditionalExpression | MemoExpression;+}+export interface ForCodegenNode extends VNodeCall {+    isBlock: true;+    tag: typeof FRAGMENT;+    props: undefined;+    children: ForRenderListExpression;+    patchFlag: PatchFlags;+    disableTracking: boolean;+}+export interface ForRenderListExpression extends CallExpression {+    callee: typeof RENDER_LIST;+    arguments: [ExpressionNode, ForIteratorExpression];+}+export interface ForIteratorExpression extends FunctionExpression {+    returns?: BlockCodegenNode;+}+export declare const locStub: SourceLocation;+export declare function createRoot(children: TemplateChildNode[], source?: string): RootNode;+export declare function createVNodeCall(context: TransformContext | null, tag: VNodeCall['tag'], props?: VNodeCall['props'], children?: VNodeCall['children'], patchFlag?: VNodeCall['patchFlag'], dynamicProps?: VNodeCall['dynamicProps'], directives?: VNodeCall['directives'], isBlock?: VNodeCall['isBlock'], disableTracking?: VNodeCall['disableTracking'], isComponent?: VNodeCall['isComponent'], loc?: SourceLocation): VNodeCall;+export declare function createArrayExpression(elements: ArrayExpression['elements'], loc?: SourceLocation): ArrayExpression;+export declare function createObjectExpression(properties: ObjectExpression['properties'], loc?: SourceLocation): ObjectExpression;+export declare function createObjectProperty(key: Property['key'] | string, value: Property['value']): Property;+export declare function createSimpleExpression(content: SimpleExpressionNode['content'], isStatic?: SimpleExpressionNode['isStatic'], loc?: SourceLocation, constType?: ConstantTypes): SimpleExpressionNode;+export declare function createInterpolation(content: InterpolationNode['content'] | string, loc: SourceLocation): InterpolationNode;+export declare function createCompoundExpression(children: CompoundExpressionNode['children'], loc?: SourceLocation): CompoundExpressionNode;+type InferCodegenNodeType<T> = T extends typeof RENDER_SLOT ? RenderSlotCall : CallExpression;+export declare function createCallExpression<T extends CallExpression['callee']>(callee: T, args?: CallExpression['arguments'], loc?: SourceLocation): InferCodegenNodeType<T>;+export declare function createFunctionExpression(params: FunctionExpression['params'], returns?: FunctionExpression['returns'], newline?: boolean, isSlot?: boolean, loc?: SourceLocation): FunctionExpression;+export declare function createConditionalExpression(test: ConditionalExpression['test'], consequent: ConditionalExpression['consequent'], alternate: ConditionalExpression['alternate'], newline?: boolean): ConditionalExpression;+export declare function createCacheExpression(index: number, value: JSChildNode, needPauseTracking?: boolean, inVOnce?: boolean): CacheExpression;+export declare function createBlockStatement(body: BlockStatement['body']): BlockStatement;+export declare function createTemplateLiteral(elements: TemplateLiteral['elements']): TemplateLiteral;+export declare function createIfStatement(test: IfStatement['test'], consequent: IfStatement['consequent'], alternate?: IfStatement['alternate']): IfStatement;+export declare function createAssignmentExpression(left: AssignmentExpression['left'], right: AssignmentExpression['right']): AssignmentExpression;+export declare function createSequenceExpression(expressions: SequenceExpression['expressions']): SequenceExpression;+export declare function createReturnStatement(returns: ReturnStatement['returns']): ReturnStatement;+export declare function getVNodeHelper(ssr: boolean, isComponent: boolean): typeof CREATE_VNODE | typeof CREATE_ELEMENT_VNODE;+export declare function getVNodeBlockHelper(ssr: boolean, isComponent: boolean): typeof CREATE_BLOCK | typeof CREATE_ELEMENT_BLOCK;+export declare function convertToBlock(node: VNodeCall, { helper, removeHelper, inSSR }: TransformContext): void;+export {};packages/compiler-core/src/babelUtils.d.tsnew file mode 100644index 000000000..bfa681f90@@ -0,0 +1,16 @@+import type { BlockStatement, Function, Identifier, Node, ObjectProperty, Program, SwitchCase } from '@babel/types';+/**+ * Return value indicates whether the AST walked can be a constant+ */+export declare function walkIdentifiers(root: Node, onIdentifier: (node: Identifier, parent: Node | null, parentStack: Node[], isReference: boolean, isLocal: boolean) => void, includeAll?: boolean, parentStack?: Node[], knownIds?: Record<string, number>): void;+export declare function isReferencedIdentifier(id: Identifier, parent: Node | null, parentStack: Node[]): boolean;+export declare function isInDestructureAssignment(parent: Node, parentStack: Node[]): boolean;+export declare function isInNewExpression(parentStack: Node[]): boolean;+export declare function walkFunctionParams(node: Function, onIdent: (id: Identifier) => void): void;+export declare function walkBlockDeclarations(block: BlockStatement | SwitchCase | Program, onIdent: (node: Identifier) => void): void;+export declare function extractIdentifiers(param: Node, nodes?: Identifier[]): Identifier[];+export declare const isFunctionType: (node: Node) => node is Function;+export declare const isStaticProperty: (node: Node) => node is ObjectProperty;+export declare const isStaticPropertyKey: (node: Node, parent: Node) => boolean;+export declare const TS_NODE_TYPES: string[];+export declare function unwrapTSNode(node: Node): Node;packages/compiler-core/src/codegen.d.tsnew file mode 100644index 000000000..ccac18db9@@ -0,0 +1,63 @@+import type { CodegenOptions } from './options';+import { type JSChildNode, type RootNode, type SSRCodegenNode, type TemplateChildNode } from './ast';+/**+ * The `SourceMapGenerator` type from `source-map-js` is a bit incomplete as it+ * misses `toJSON()`. We also need to add types for internal properties which we+ * need to access for better performance.+ *+ * Since TS 5.3, dts generation starts to strangely include broken triple slash+ * references for source-map-js, so we are inlining all source map related types+ * here to workaround that.+ */+export interface CodegenSourceMapGenerator {+    setSourceContent(sourceFile: string, sourceContent: string): void;+    toJSON(): RawSourceMap;+    _sources: Set<string>;+    _names: Set<string>;+    _mappings: {+        add(mapping: MappingItem): void;+    };+}+export interface RawSourceMap {+    file?: string;+    sourceRoot?: string;+    version: string;+    sources: string[];+    names: string[];+    sourcesContent?: string[];+    mappings: string;+}+interface MappingItem {+    source: string;+    generatedLine: number;+    generatedColumn: number;+    originalLine: number;+    originalColumn: number;+    name: string | null;+}+type CodegenNode = TemplateChildNode | JSChildNode | SSRCodegenNode;+export interface CodegenResult {+    code: string;+    preamble: string;+    ast: RootNode;+    map?: RawSourceMap;+}+export interface CodegenContext extends Omit<Required<CodegenOptions>, 'bindingMetadata' | 'inline'> {+    source: string;+    code: string;+    line: number;+    column: number;+    offset: number;+    indentLevel: number;+    pure: boolean;+    map?: CodegenSourceMapGenerator;+    helper(key: symbol): string;+    push(code: string, newlineIndex?: number, node?: CodegenNode): void;+    indent(): void;+    deindent(withoutNewLine?: boolean): void;+    newline(): void;+}+export declare function generate(ast: RootNode, options?: CodegenOptions & {+    onContextCreated?: (context: CodegenContext) => void;+}): CodegenResult;+export {};packages/compiler-core/src/compat/compatConfig.d.tsnew file mode 100644index 000000000..4b1c14f96@@ -0,0 +1,22 @@+import type { SourceLocation } from '../ast';+import type { MergedParserOptions } from '../parser';+import type { TransformContext } from '../transform';+export type CompilerCompatConfig = Partial<Record<CompilerDeprecationTypes, boolean | 'suppress-warning'>> & {+    MODE?: 2 | 3;+};+export interface CompilerCompatOptions {+    compatConfig?: CompilerCompatConfig;+}+export declare enum CompilerDeprecationTypes {+    COMPILER_IS_ON_ELEMENT = "COMPILER_IS_ON_ELEMENT",+    COMPILER_V_BIND_SYNC = "COMPILER_V_BIND_SYNC",+    COMPILER_V_BIND_OBJECT_ORDER = "COMPILER_V_BIND_OBJECT_ORDER",+    COMPILER_V_ON_NATIVE = "COMPILER_V_ON_NATIVE",+    COMPILER_V_IF_V_FOR_PRECEDENCE = "COMPILER_V_IF_V_FOR_PRECEDENCE",+    COMPILER_NATIVE_TEMPLATE = "COMPILER_NATIVE_TEMPLATE",+    COMPILER_INLINE_TEMPLATE = "COMPILER_INLINE_TEMPLATE",+    COMPILER_FILTERS = "COMPILER_FILTERS"+}+export declare function isCompatEnabled(key: CompilerDeprecationTypes, context: MergedParserOptions | TransformContext): boolean;+export declare function checkCompatEnabled(key: CompilerDeprecationTypes, context: MergedParserOptions | TransformContext, loc: SourceLocation | null, ...args: any[]): boolean;+export declare function warnDeprecation(key: CompilerDeprecationTypes, context: MergedParserOptions | TransformContext, loc: SourceLocation | null, ...args: any[]): void;packages/compiler-core/src/compat/transformFilter.d.tsnew file mode 100644index 000000000..559265fed@@ -0,0 +1,2 @@+import type { NodeTransform } from '../transform';+export declare const transformFilter: NodeTransform;packages/compiler-core/src/compile.d.tsnew file mode 100644index 000000000..92a90a6f8@@ -0,0 +1,10 @@+import type { CompilerOptions } from './options';+import { type DirectiveTransform, type NodeTransform } from './transform';+import { type CodegenResult } from './codegen';+import type { RootNode } from './ast';+export type TransformPreset = [+    NodeTransform[],+    Record<string, DirectiveTransform>+];+export declare function getBaseTransformPreset(prefixIdentifiers?: boolean): TransformPreset;+export declare function baseCompile(source: string | RootNode, options?: CompilerOptions): CodegenResult;packages/compiler-core/src/errors.d.tsnew file mode 100644index 000000000..ed6217a2f@@ -0,0 +1,73 @@+import type { SourceLocation } from './ast';+export interface CompilerError extends SyntaxError {+    code: number | string;+    loc?: SourceLocation;+}+export interface CoreCompilerError extends CompilerError {+    code: ErrorCodes;+}+export declare function defaultOnError(error: CompilerError): never;+export declare function defaultOnWarn(msg: CompilerError): void;+type InferCompilerError<T> = T extends ErrorCodes ? CoreCompilerError : CompilerError;+export declare function createCompilerError<T extends number>(code: T, loc?: SourceLocation, messages?: {+    [code: number]: string;+}, additionalMessage?: string): InferCompilerError<T>;+export declare enum ErrorCodes {+    ABRUPT_CLOSING_OF_EMPTY_COMMENT = 0,+    CDATA_IN_HTML_CONTENT = 1,+    DUPLICATE_ATTRIBUTE = 2,+    END_TAG_WITH_ATTRIBUTES = 3,+    END_TAG_WITH_TRAILING_SOLIDUS = 4,+    EOF_BEFORE_TAG_NAME = 5,+    EOF_IN_CDATA = 6,+    EOF_IN_COMMENT = 7,+    EOF_IN_SCRIPT_HTML_COMMENT_LIKE_TEXT = 8,+    EOF_IN_TAG = 9,+    INCORRECTLY_CLOSED_COMMENT = 10,+    INCORRECTLY_OPENED_COMMENT = 11,+    INVALID_FIRST_CHARACTER_OF_TAG_NAME = 12,+    MISSING_ATTRIBUTE_VALUE = 13,+    MISSING_END_TAG_NAME = 14,+    MISSING_WHITESPACE_BETWEEN_ATTRIBUTES = 15,+    NESTED_COMMENT = 16,+    UNEXPECTED_CHARACTER_IN_ATTRIBUTE_NAME = 17,+    UNEXPECTED_CHARACTER_IN_UNQUOTED_ATTRIBUTE_VALUE = 18,+    UNEXPECTED_EQUALS_SIGN_BEFORE_ATTRIBUTE_NAME = 19,+    UNEXPECTED_NULL_CHARACTER = 20,+    UNEXPECTED_QUESTION_MARK_INSTEAD_OF_TAG_NAME = 21,+    UNEXPECTED_SOLIDUS_IN_TAG = 22,+    X_INVALID_END_TAG = 23,+    X_MISSING_END_TAG = 24,+    X_MISSING_INTERPOLATION_END = 25,+    X_MISSING_DIRECTIVE_NAME = 26,+    X_MISSING_DYNAMIC_DIRECTIVE_ARGUMENT_END = 27,+    X_V_IF_NO_EXPRESSION = 28,+    X_V_IF_SAME_KEY = 29,+    X_V_ELSE_NO_ADJACENT_IF = 30,+    X_V_FOR_NO_EXPRESSION = 31,+    X_V_FOR_MALFORMED_EXPRESSION = 32,+    X_V_FOR_TEMPLATE_KEY_PLACEMENT = 33,+    X_V_BIND_NO_EXPRESSION = 34,+    X_V_ON_NO_EXPRESSION = 35,+    X_V_SLOT_UNEXPECTED_DIRECTIVE_ON_SLOT_OUTLET = 36,+    X_V_SLOT_MIXED_SLOT_USAGE = 37,+    X_V_SLOT_DUPLICATE_SLOT_NAMES = 38,+    X_V_SLOT_EXTRANEOUS_DEFAULT_SLOT_CHILDREN = 39,+    X_V_SLOT_MISPLACED = 40,+    X_V_MODEL_NO_EXPRESSION = 41,+    X_V_MODEL_MALFORMED_EXPRESSION = 42,+    X_V_MODEL_ON_SCOPE_VARIABLE = 43,+    X_V_MODEL_ON_PROPS = 44,+    X_V_MODEL_ON_CONST = 45,+    X_INVALID_EXPRESSION = 46,+    X_KEEP_ALIVE_INVALID_CHILDREN = 47,+    X_PREFIX_ID_NOT_SUPPORTED = 48,+    X_MODULE_MODE_NOT_SUPPORTED = 49,+    X_CACHE_HANDLER_NOT_SUPPORTED = 50,+    X_SCOPE_ID_NOT_SUPPORTED = 51,+    X_VNODE_HOOKS = 52,+    X_V_BIND_INVALID_SAME_NAME_ARGUMENT = 53,+    __EXTEND_POINT__ = 54+}+export declare const errorMessages: Record<ErrorCodes, string>;+export {};packages/compiler-core/src/index.d.tsnew file mode 100644index 000000000..9bc96957a@@ -0,0 +1,25 @@+export { baseCompile } from './compile';+export { type CompilerOptions, type ParserOptions, type TransformOptions, type CodegenOptions, type HoistTransform, type BindingMetadata, BindingTypes, } from './options';+export { baseParse } from './parser';+export { transform, type TransformContext, createTransformContext, traverseNode, createStructuralDirectiveTransform, type NodeTransform, type StructuralDirectiveTransform, type DirectiveTransform, } from './transform';+export { generate, type CodegenContext, type CodegenResult, type CodegenSourceMapGenerator, type RawSourceMap, } from './codegen';+export { ErrorCodes, errorMessages, createCompilerError, type CoreCompilerError, type CompilerError, } from './errors';+export * from './ast';+export * from './utils';+export * from './babelUtils';+export * from './runtimeHelpers';+export { getBaseTransformPreset, type TransformPreset } from './compile';+export { transformModel } from './transforms/vModel';+export { transformOn } from './transforms/vOn';+export { transformBind } from './transforms/vBind';+export { noopDirectiveTransform } from './transforms/noopDirectiveTransform';+export { processIf } from './transforms/vIf';+export { processFor, createForLoopParams } from './transforms/vFor';+export { transformExpression, processExpression, stringifyExpression, } from './transforms/transformExpression';+export { buildSlots, type SlotFnBuilder, trackVForSlotScopes, trackSlotScopes, } from './transforms/vSlot';+export { transformElement, resolveComponentType, buildProps, buildDirectiveArgs, type PropsExpression, } from './transforms/transformElement';+export { transformVBindShorthand } from './transforms/transformVBindShorthand';+export { processSlotOutlet } from './transforms/transformSlotOutlet';+export { getConstantType } from './transforms/cacheStatic';+export { generateCodeFrame } from '@vue/shared';+export { checkCompatEnabled, warnDeprecation, CompilerDeprecationTypes, } from './compat/compatConfig';packages/compiler-core/src/options.d.tsnew file mode 100644index 000000000..cf4cc8ea4@@ -0,0 +1,318 @@+import type { ElementNode, Namespace, Namespaces, ParentNode, TemplateChildNode } from './ast';+import type { CompilerError } from './errors';+import type { DirectiveTransform, NodeTransform, TransformContext } from './transform';+import type { CompilerCompatOptions } from './compat/compatConfig';+import type { ParserPlugin } from '@babel/parser';+export interface ErrorHandlingOptions {+    onWarn?: (warning: CompilerError) => void;+    onError?: (error: CompilerError) => void;+}+export interface ParserOptions extends ErrorHandlingOptions, CompilerCompatOptions {+    /**+     * Base mode is platform agnostic and only parses HTML-like template syntax,+     * treating all tags the same way. Specific tag parsing behavior can be+     * configured by higher-level compilers.+     *+     * HTML mode adds additional logic for handling special parsing behavior in+     * `<script>`, `<style>`,`<title>` and `<textarea>`.+     * The logic is handled inside compiler-core for efficiency.+     *+     * SFC mode treats content of all root-level tags except `<template>` as plain+     * text.+     */+    parseMode?: 'base' | 'html' | 'sfc';+    /**+     * Specify the root namespace to use when parsing a template.+     * Defaults to `Namespaces.HTML` (0).+     */+    ns?: Namespaces;+    /**+     * e.g. platform native elements, e.g. `<div>` for browsers+     */+    isNativeTag?: (tag: string) => boolean;+    /**+     * e.g. native elements that can self-close, e.g. `<img>`, `<br>`, `<hr>`+     */+    isVoidTag?: (tag: string) => boolean;+    /**+     * e.g. elements that should preserve whitespace inside, e.g. `<pre>`+     */+    isPreTag?: (tag: string) => boolean;+    /**+     * Elements that should ignore the first newline token per parinsg spec+     * e.g. `<textarea>` and `<pre>`+     */+    isIgnoreNewlineTag?: (tag: string) => boolean;+    /**+     * Platform-specific built-in components e.g. `<Transition>`+     */+    isBuiltInComponent?: (tag: string) => symbol | void;+    /**+     * Separate option for end users to extend the native elements list+     */+    isCustomElement?: (tag: string) => boolean | void;+    /**+     * Get tag namespace+     */+    getNamespace?: (tag: string, parent: ElementNode | undefined, rootNamespace: Namespace) => Namespace;+    /**+     * @default ['{{', '}}']+     */+    delimiters?: [string, string];+    /**+     * Whitespace handling strategy+     * @default 'condense'+     */+    whitespace?: 'preserve' | 'condense';+    /**+     * Only used for DOM compilers that runs in the browser.+     * In non-browser builds, this option is ignored.+     */+    decodeEntities?: (rawText: string, asAttr: boolean) => string;+    /**+     * Whether to keep comments in the templates AST.+     * This defaults to `true` in development and `false` in production builds.+     */+    comments?: boolean;+    /**+     * Parse JavaScript expressions with Babel.+     * @default false+     */+    prefixIdentifiers?: boolean;+    /**+     * A list of parser plugins to enable for `@babel/parser`, which is used to+     * parse expressions in bindings and interpolations.+     * https://babeljs.io/docs/en/next/babel-parser#plugins+     */+    expressionPlugins?: ParserPlugin[];+}+export type HoistTransform = (children: TemplateChildNode[], context: TransformContext, parent: ParentNode) => void;+export declare enum BindingTypes {+    /**+     * returned from data()+     */+    DATA = "data",+    /**+     * declared as a prop+     */+    PROPS = "props",+    /**+     * a local alias of a `<script setup>` destructured prop.+     * the original is stored in __propsAliases of the bindingMetadata object.+     */+    PROPS_ALIASED = "props-aliased",+    /**+     * a let binding (may or may not be a ref)+     */+    SETUP_LET = "setup-let",+    /**+     * a const binding that can never be a ref.+     * these bindings don't need `unref()` calls when processed in inlined+     * template expressions.+     */+    SETUP_CONST = "setup-const",+    /**+     * a const binding that does not need `unref()`, but may be mutated.+     */+    SETUP_REACTIVE_CONST = "setup-reactive-const",+    /**+     * a const binding that may be a ref.+     */+    SETUP_MAYBE_REF = "setup-maybe-ref",+    /**+     * bindings that are guaranteed to be refs+     */+    SETUP_REF = "setup-ref",+    /**+     * declared by other options, e.g. computed, inject+     */+    OPTIONS = "options",+    /**+     * a literal constant, e.g. 'foo', 1, true+     */+    LITERAL_CONST = "literal-const"+}+export type BindingMetadata = {+    [key: string]: BindingTypes | undefined;+} & {+    __isScriptSetup?: boolean;+    __propsAliases?: Record<string, string>;+};+interface SharedTransformCodegenOptions {+    /**+     * Transform expressions like {{ foo }} to `_ctx.foo`.+     * If this option is false, the generated code will be wrapped in a+     * `with (this) { ... }` block.+     * - This is force-enabled in module mode, since modules are by default strict+     * and cannot use `with`+     * @default mode === 'module'+     */+    prefixIdentifiers?: boolean;+    /**+     * Control whether generate SSR-optimized render functions instead.+     * The resulting function must be attached to the component via the+     * `ssrRender` option instead of `render`.+     *+     * When compiler generates code for SSR's fallback branch, we need to set it to false:+     *  - context.ssr = false+     *+     * see `subTransform` in `ssrTransformComponent.ts`+     */+    ssr?: boolean;+    /**+     * Indicates whether the compiler generates code for SSR,+     * it is always true when generating code for SSR,+     * regardless of whether we are generating code for SSR's fallback branch,+     * this means that when the compiler generates code for SSR's fallback branch:+     *  - context.ssr = false+     *  - context.inSSR = true+     */+    inSSR?: boolean;+    /**+     * Optional binding metadata analyzed from script - used to optimize+     * binding access when `prefixIdentifiers` is enabled.+     */+    bindingMetadata?: BindingMetadata;+    /**+     * Compile the function for inlining inside setup().+     * This allows the function to directly access setup() local bindings.+     */+    inline?: boolean;+    /**+     * Indicates that transforms and codegen should try to output valid TS code+     */+    isTS?: boolean;+    /**+     * Filename for source map generation.+     * Also used for self-recursive reference in templates+     * @default 'template.vue.html'+     */+    filename?: string;+}+export interface TransformOptions extends SharedTransformCodegenOptions, ErrorHandlingOptions, CompilerCompatOptions {+    /**+     * An array of node transforms to be applied to every AST node.+     */+    nodeTransforms?: NodeTransform[];+    /**+     * An object of { name: transform } to be applied to every directive attribute+     * node found on element nodes.+     */+    directiveTransforms?: Record<string, DirectiveTransform | undefined>;+    /**+     * An optional hook to transform a node being hoisted.+     * used by compiler-dom to turn hoisted nodes into stringified HTML vnodes.+     * @default null+     */+    transformHoist?: HoistTransform | null;+    /**+     * If the pairing runtime provides additional built-in elements, use this to+     * mark them as built-in so the compiler will generate component vnodes+     * for them.+     */+    isBuiltInComponent?: (tag: string) => symbol | void;+    /**+     * Used by some transforms that expects only native elements+     */+    isCustomElement?: (tag: string) => boolean | void;+    /**+     * Transform expressions like {{ foo }} to `_ctx.foo`.+     * If this option is false, the generated code will be wrapped in a+     * `with (this) { ... }` block.+     * - This is force-enabled in module mode, since modules are by default strict+     * and cannot use `with`+     * @default mode === 'module'+     */+    prefixIdentifiers?: boolean;+    /**+     * Cache static VNodes and props objects to `_hoisted_x` constants+     * @default false+     */+    hoistStatic?: boolean;+    /**+     * Cache v-on handlers to avoid creating new inline functions on each render,+     * also avoids the need for dynamically patching the handlers by wrapping it.+     * e.g `@click="foo"` by default is compiled to `{ onClick: foo }`. With this+     * option it's compiled to:+     * ```js+     * { onClick: _cache[0] || (_cache[0] = e => _ctx.foo(e)) }+     * ```+     * - Requires "prefixIdentifiers" to be enabled because it relies on scope+     * analysis to determine if a handler is safe to cache.+     * @default false+     */+    cacheHandlers?: boolean;+    /**+     * A list of parser plugins to enable for `@babel/parser`, which is used to+     * parse expressions in bindings and interpolations.+     * https://babeljs.io/docs/en/next/babel-parser#plugins+     */+    expressionPlugins?: ParserPlugin[];+    /**+     * SFC scoped styles ID+     */+    scopeId?: string | null;+    /**+     * Indicates this SFC template has used :slotted in its styles+     * Defaults to `true` for backwards compatibility - SFC tooling should set it+     * to `false` if no `:slotted` usage is detected in `<style>`+     */+    slotted?: boolean;+    /**+     * SFC `<style vars>` injection string+     * Should already be an object expression, e.g. `{ 'xxxx-color': color }`+     * needed to render inline CSS variables on component root+     */+    ssrCssVars?: string;+    /**+     * Whether to compile the template assuming it needs to handle HMR.+     * Some edge cases may need to generate different code for HMR to work+     * correctly, e.g. #6938, #7138+     */+    hmr?: boolean;+}+export interface CodegenOptions extends SharedTransformCodegenOptions {+    /**+     * - `module` mode will generate ES module import statements for helpers+     * and export the render function as the default export.+     * - `function` mode will generate a single `const { helpers... } = Vue`+     * statement and return the render function. It expects `Vue` to be globally+     * available (or passed by wrapping the code with an IIFE). It is meant to be+     * used with `new Function(code)()` to generate a render function at runtime.+     * @default 'function'+     */+    mode?: 'module' | 'function';+    /**+     * Generate source map?+     * @default false+     */+    sourceMap?: boolean;+    /**+     * SFC scoped styles ID+     */+    scopeId?: string | null;+    /**+     * Option to optimize helper import bindings via variable assignment+     * (only used for webpack code-split)+     * @default false+     */+    optimizeImports?: boolean;+    /**+     * Customize where to import runtime helpers from.+     * @default 'vue'+     */+    runtimeModuleName?: string;+    /**+     * Customize where to import ssr runtime helpers from/**+     * @default 'vue/server-renderer'+     */+    ssrRuntimeModuleName?: string;+    /**+     * Customize the global variable name of `Vue` to get helpers from+     * in function mode+     * @default 'Vue'+     */+    runtimeGlobalName?: string;+}+export type CompilerOptions = ParserOptions & TransformOptions & CodegenOptions;+export {};packages/compiler-core/src/parser.d.tsnew file mode 100644index 000000000..dfdefe4a0@@ -0,0 +1,9 @@+import { type RootNode, type SourceLocation } from './ast';+import type { ParserOptions } from './options';+import { type CompilerCompatOptions } from './compat/compatConfig';+type OptionalOptions = 'decodeEntities' | 'whitespace' | 'isNativeTag' | 'isBuiltInComponent' | 'expressionPlugins' | keyof CompilerCompatOptions;+export type MergedParserOptions = Omit<Required<ParserOptions>, OptionalOptions> & Pick<ParserOptions, OptionalOptions>;+export declare const defaultParserOptions: MergedParserOptions;+export declare function cloneLoc(loc: SourceLocation): SourceLocation;+export declare function baseParse(input: string, options?: ParserOptions): RootNode;+export {};packages/compiler-core/src/runtimeHelpers.d.tsnew file mode 100644index 000000000..a76ded16f@@ -0,0 +1,48 @@+export declare const FRAGMENT: unique symbol;+export declare const TELEPORT: unique symbol;+export declare const SUSPENSE: unique symbol;+export declare const KEEP_ALIVE: unique symbol;+export declare const BASE_TRANSITION: unique symbol;+export declare const OPEN_BLOCK: unique symbol;+export declare const CREATE_BLOCK: unique symbol;+export declare const CREATE_ELEMENT_BLOCK: unique symbol;+export declare const CREATE_VNODE: unique symbol;+export declare const CREATE_ELEMENT_VNODE: unique symbol;+export declare const CREATE_COMMENT: unique symbol;+export declare const CREATE_TEXT: unique symbol;+export declare const CREATE_STATIC: unique symbol;+export declare const RESOLVE_COMPONENT: unique symbol;+export declare const RESOLVE_DYNAMIC_COMPONENT: unique symbol;+export declare const RESOLVE_DIRECTIVE: unique symbol;+export declare const RESOLVE_FILTER: unique symbol;+export declare const WITH_DIRECTIVES: unique symbol;+export declare const RENDER_LIST: unique symbol;+export declare const RENDER_SLOT: unique symbol;+export declare const CREATE_SLOTS: unique symbol;+export declare const TO_DISPLAY_STRING: unique symbol;+export declare const MERGE_PROPS: unique symbol;+export declare const NORMALIZE_CLASS: unique symbol;+export declare const NORMALIZE_STYLE: unique symbol;+export declare const NORMALIZE_PROPS: unique symbol;+export declare const GUARD_REACTIVE_PROPS: unique symbol;+export declare const TO_HANDLERS: unique symbol;+export declare const CAMELIZE: unique symbol;+export declare const CAPITALIZE: unique symbol;+export declare const TO_HANDLER_KEY: unique symbol;+export declare const SET_BLOCK_TRACKING: unique symbol;+/**+ * @deprecated no longer needed in 3.5+ because we no longer hoist element nodes+ * but kept for backwards compat+ */+export declare const PUSH_SCOPE_ID: unique symbol;+/**+ * @deprecated kept for backwards compat+ */+export declare const POP_SCOPE_ID: unique symbol;+export declare const WITH_CTX: unique symbol;+export declare const UNREF: unique symbol;+export declare const IS_REF: unique symbol;+export declare const WITH_MEMO: unique symbol;+export declare const IS_MEMO_SAME: unique symbol;+export declare const helperNameMap: Record<symbol, string>;+export declare function registerRuntimeHelpers(helpers: Record<symbol, string>): void;packages/compiler-core/src/tokenizer.d.tsnew file mode 100644index 000000000..62de4dc27@@ -0,0 +1,260 @@+/**+ * This Tokenizer is adapted from htmlparser2 under the MIT License listed at+ * https://github.com/fb55/htmlparser2/blob/master/LICENSE++Copyright 2010, 2011, Chris Winberry <chris@winberry.net>. All rights reserved.+Permission is hereby granted, free of charge, to any person obtaining a copy+of this software and associated documentation files (the "Software"), to+deal in the Software without restriction, including without limitation the+rights to use, copy, modify, merge, publish, distribute, sublicense, and/or+sell copies of the Software, and to permit persons to whom the Software is+furnished to do so, subject to the following conditions:++The above copyright notice and this permission notice shall be included in+all copies or substantial portions of the Software.++THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING+FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS+IN THE SOFTWARE.+ */+import { ErrorCodes } from './errors';+import type { ElementNode, Position } from './ast';+export declare enum ParseMode {+    BASE = 0,+    HTML = 1,+    SFC = 2+}+export declare enum CharCodes {+    Tab = 9,// "\t"+    NewLine = 10,// "\n"+    FormFeed = 12,// "\f"+    CarriageReturn = 13,// "\r"+    Space = 32,// " "+    ExclamationMark = 33,// "!"+    Number = 35,// "#"+    Amp = 38,// "&"+    SingleQuote = 39,// "'"+    DoubleQuote = 34,// '"'+    GraveAccent = 96,// "`"+    Dash = 45,// "-"+    Slash = 47,// "/"+    Zero = 48,// "0"+    Nine = 57,// "9"+    Semi = 59,// ";"+    Lt = 60,// "<"+    Eq = 61,// "="+    Gt = 62,// ">"+    Questionmark = 63,// "?"+    UpperA = 65,// "A"+    LowerA = 97,// "a"+    UpperF = 70,// "F"+    LowerF = 102,// "f"+    UpperZ = 90,// "Z"+    LowerZ = 122,// "z"+    LowerX = 120,// "x"+    LowerV = 118,// "v"+    Dot = 46,// "."+    Colon = 58,// ":"+    At = 64,// "@"+    LeftSquare = 91,// "["+    RightSquare = 93+}+/** All the states the tokenizer can be in. */+export declare enum State {+    Text = 1,+    InterpolationOpen = 2,+    Interpolation = 3,+    InterpolationClose = 4,+    BeforeTagName = 5,// After <+    InTagName = 6,+    InSelfClosingTag = 7,+    BeforeClosingTagName = 8,+    InClosingTagName = 9,+    AfterClosingTagName = 10,+    BeforeAttrName = 11,+    InAttrName = 12,+    InDirName = 13,+    InDirArg = 14,+    InDirDynamicArg = 15,+    InDirModifier = 16,+    AfterAttrName = 17,+    BeforeAttrValue = 18,+    InAttrValueDq = 19,// "+    InAttrValueSq = 20,// '+    InAttrValueNq = 21,+    BeforeDeclaration = 22,// !+    InDeclaration = 23,+    InProcessingInstruction = 24,// ?+    BeforeComment = 25,+    CDATASequence = 26,+    InSpecialComment = 27,+    InCommentLike = 28,+    BeforeSpecialS = 29,// Decide if we deal with `<script` or `<style`+    BeforeSpecialT = 30,// Decide if we deal with `<title` or `<textarea`+    SpecialStartSequence = 31,+    InRCDATA = 32,+    InEntity = 33,+    InSFCRootTagName = 34+}+export declare function isWhitespace(c: number): boolean;+export declare function toCharCodes(str: string): Uint8Array;+export declare enum QuoteType {+    NoValue = 0,+    Unquoted = 1,+    Single = 2,+    Double = 3+}+export interface Callbacks {+    ontext(start: number, endIndex: number): void;+    ontextentity(char: string, start: number, endIndex: number): void;+    oninterpolation(start: number, endIndex: number): void;+    onopentagname(start: number, endIndex: number): void;+    onopentagend(endIndex: number): void;+    onselfclosingtag(endIndex: number): void;+    onclosetag(start: number, endIndex: number): void;+    onattribdata(start: number, endIndex: number): void;+    onattribentity(char: string, start: number, end: number): void;+    onattribend(quote: QuoteType, endIndex: number): void;+    onattribname(start: number, endIndex: number): void;+    onattribnameend(endIndex: number): void;+    ondirname(start: number, endIndex: number): void;+    ondirarg(start: number, endIndex: number): void;+    ondirmodifier(start: number, endIndex: number): void;+    oncomment(start: number, endIndex: number): void;+    oncdata(start: number, endIndex: number): void;+    onprocessinginstruction(start: number, endIndex: number): void;+    onend(): void;+    onerr(code: ErrorCodes, index: number): void;+}+/**+ * Sequences used to match longer strings.+ *+ * We don't have `Script`, `Style`, or `Title` here. Instead, we re-use the *End+ * sequences with an increased offset.+ */+export declare const Sequences: {+    Cdata: Uint8Array;+    CdataEnd: Uint8Array;+    CommentEnd: Uint8Array;+    ScriptEnd: Uint8Array;+    StyleEnd: Uint8Array;+    TitleEnd: Uint8Array;+    TextareaEnd: Uint8Array;+};+export default class Tokenizer {+    private readonly stack;+    private readonly cbs;+    /** The current state the tokenizer is in. */+    state: State;+    /** The read buffer. */+    private buffer;+    /** The beginning of the section that is currently being read. */+    sectionStart: number;+    /** The index within the buffer that we are currently looking at. */+    private index;+    /** The start of the last entity. */+    private entityStart;+    /** Some behavior, eg. when decoding entities, is done while we are in another state. This keeps track of the other state type. */+    private baseState;+    /** For special parsing behavior inside of script and style tags. */+    inRCDATA: boolean;+    /** For disabling RCDATA tags handling */+    inXML: boolean;+    /** For disabling interpolation parsing in v-pre */+    inVPre: boolean;+    /** Record newline positions for fast line / column calculation */+    private newlines;+    private readonly entityDecoder?;+    mode: ParseMode;+    get inSFCRoot(): boolean;+    constructor(stack: ElementNode[], cbs: Callbacks);+    reset(): void;+    /**+     * Generate Position object with line / column information using recorded+     * newline positions. We know the index is always going to be an already+     * processed index, so all the newlines up to this index should have been+     * recorded.+     */+    getPos(index: number): Position;+    private peek;+    private stateText;+    delimiterOpen: Uint8Array;+    delimiterClose: Uint8Array;+    private delimiterIndex;+    private stateInterpolationOpen;+    private stateInterpolation;+    private stateInterpolationClose;+    currentSequence: Uint8Array;+    private sequenceIndex;+    private stateSpecialStartSequence;+    /** Look for an end tag. For <title> and <textarea>, also decode entities. */+    private stateInRCDATA;+    private stateCDATASequence;+    /**+     * When we wait for one specific character, we can speed things up+     * by skipping through the buffer until we find it.+     *+     * @returns Whether the character was found.+     */+    private fastForwardTo;+    /**+     * Comments and CDATA end with `-->` and `]]>`.+     *+     * Their common qualities are:+     * - Their end sequences have a distinct character they start with.+     * - That character is then repeated, so we have to check multiple repeats.+     * - All characters but the start character of the sequence can be skipped.+     */+    private stateInCommentLike;+    private startSpecial;+    enterRCDATA(sequence: Uint8Array, offset: number): void;+    private stateBeforeTagName;+    private stateInTagName;+    private stateInSFCRootTagName;+    private handleTagName;+    private stateBeforeClosingTagName;+    private stateInClosingTagName;+    private stateAfterClosingTagName;+    private stateBeforeAttrName;+    private handleAttrStart;+    private stateInSelfClosingTag;+    private stateInAttrName;+    private stateInDirName;+    private stateInDirArg;+    private stateInDynamicDirArg;+    private stateInDirModifier;+    private handleAttrNameEnd;+    private stateAfterAttrName;+    private stateBeforeAttrValue;+    private handleInAttrValue;+    private stateInAttrValueDoubleQuotes;+    private stateInAttrValueSingleQuotes;+    private stateInAttrValueNoQuotes;+    private stateBeforeDeclaration;+    private stateInDeclaration;+    private stateInProcessingInstruction;+    private stateBeforeComment;+    private stateInSpecialComment;+    private stateBeforeSpecialS;+    private stateBeforeSpecialT;+    private startEntity;+    private stateInEntity;+    /**+     * Iterates through the buffer, calling the function corresponding to the current state.+     *+     * States that are more likely to be hit are higher up, as a performance improvement.+     */+    parse(input: string): void;+    /**+     * Remove data that has already been consumed from the buffer.+     */+    private cleanup;+    private finish;+    /** Handle any trailing data. */+    private handleTrailingData;+    private emitCodePoint;+}packages/compiler-core/src/transform.d.tsnew file mode 100644index 000000000..08a9b6a6e@@ -0,0 +1,58 @@+import type { TransformOptions } from './options';+import { type ArrayExpression, type CacheExpression, ConstantTypes, type DirectiveNode, type ElementNode, type ExpressionNode, type JSChildNode, type ParentNode, type Property, type RootNode, type SimpleExpressionNode, type TemplateChildNode, type TemplateLiteral } from './ast';+import type { CompilerCompatOptions } from './compat/compatConfig';+export type NodeTransform = (node: RootNode | TemplateChildNode, context: TransformContext) => void | (() => void) | (() => void)[];+export type DirectiveTransform = (dir: DirectiveNode, node: ElementNode, context: TransformContext, augmentor?: (ret: DirectiveTransformResult) => DirectiveTransformResult) => DirectiveTransformResult;+export interface DirectiveTransformResult {+    props: Property[];+    needRuntime?: boolean | symbol;+    ssrTagParts?: TemplateLiteral['elements'];+}+export type StructuralDirectiveTransform = (node: ElementNode, dir: DirectiveNode, context: TransformContext) => void | (() => void);+export interface ImportItem {+    exp: string | ExpressionNode;+    path: string;+}+export interface TransformContext extends Required<Omit<TransformOptions, keyof CompilerCompatOptions>>, CompilerCompatOptions {+    selfName: string | null;+    root: RootNode;+    helpers: Map<symbol, number>;+    components: Set<string>;+    directives: Set<string>;+    hoists: (JSChildNode | null)[];+    imports: ImportItem[];+    temps: number;+    cached: (CacheExpression | null)[];+    identifiers: {+        [name: string]: number | undefined;+    };+    scopes: {+        vFor: number;+        vSlot: number;+        vPre: number;+        vOnce: number;+    };+    parent: ParentNode | null;+    grandParent: ParentNode | null;+    childIndex: number;+    currentNode: RootNode | TemplateChildNode | null;+    inVOnce: boolean;+    helper<T extends symbol>(name: T): T;+    removeHelper<T extends symbol>(name: T): void;+    helperString(name: symbol): string;+    replaceNode(node: TemplateChildNode): void;+    removeNode(node?: TemplateChildNode): void;+    onNodeRemoved(): void;+    addIdentifiers(exp: ExpressionNode | string): void;+    removeIdentifiers(exp: ExpressionNode | string): void;+    hoist(exp: string | JSChildNode | ArrayExpression): SimpleExpressionNode;+    cache(exp: JSChildNode, isVNode?: boolean, inVOnce?: boolean): CacheExpression;+    constantCache: WeakMap<TemplateChildNode, ConstantTypes>;+    vForMemoKeyedNodes: WeakSet<ElementNode>;+    filters?: Set<string>;+}+export declare function createTransformContext(root: RootNode, { filename, prefixIdentifiers, hoistStatic, hmr, cacheHandlers, nodeTransforms, directiveTransforms, transformHoist, isBuiltInComponent, isCustomElement, expressionPlugins, scopeId, slotted, ssr, inSSR, ssrCssVars, bindingMetadata, inline, isTS, onError, onWarn, compatConfig, }: TransformOptions): TransformContext;+export declare function transform(root: RootNode, options: TransformOptions): void;+export declare function traverseChildren(parent: ParentNode, context: TransformContext): void;+export declare function traverseNode(node: RootNode | TemplateChildNode, context: TransformContext): void;+export declare function createStructuralDirectiveTransform(name: string | RegExp, fn: StructuralDirectiveTransform): NodeTransform;packages/compiler-core/src/transforms/cacheStatic.d.tsnew file mode 100644index 000000000..385a32140@@ -0,0 +1,5 @@+import { type CacheExpression, type ComponentNode, ConstantTypes, type PlainElementNode, type RootNode, type SimpleExpressionNode, type TemplateChildNode, type TemplateNode } from '../ast';+import type { TransformContext } from '../transform';+export declare function cacheStatic(root: RootNode, context: TransformContext): void;+export declare function getSingleElementRoot(root: RootNode): PlainElementNode | ComponentNode | TemplateNode | null;+export declare function getConstantType(node: TemplateChildNode | SimpleExpressionNode | CacheExpression, context: TransformContext): ConstantTypes;packages/compiler-core/src/transforms/noopDirectiveTransform.d.tsnew file mode 100644index 000000000..acc76bcd4@@ -0,0 +1,2 @@+import type { DirectiveTransform } from '../transform';+export declare const noopDirectiveTransform: DirectiveTransform;packages/compiler-core/src/transforms/transformElement.d.tsnew file mode 100644index 000000000..85ee6f983@@ -0,0 +1,13 @@+import type { NodeTransform, TransformContext } from '../transform';+import { type ArrayExpression, type CallExpression, type ComponentNode, type DirectiveNode, type ElementNode, type ExpressionNode, type ObjectExpression } from '../ast';+export declare const transformElement: NodeTransform;+export declare function resolveComponentType(node: ComponentNode, context: TransformContext, ssr?: boolean): string | symbol | CallExpression;+export type PropsExpression = ObjectExpression | CallExpression | ExpressionNode;+export declare function buildProps(node: ElementNode, context: TransformContext, props: ElementNode['props'] | undefined, isComponent: boolean, isDynamicComponent: boolean, ssr?: boolean): {+    props: PropsExpression | undefined;+    directives: DirectiveNode[];+    patchFlag: number;+    dynamicPropNames: string[];+    shouldUseBlock: boolean;+};+export declare function buildDirectiveArgs(dir: DirectiveNode, context: TransformContext): ArrayExpression;packages/compiler-core/src/transforms/transformExpression.d.tsnew file mode 100644index 000000000..adf88967a@@ -0,0 +1,5 @@+import type { NodeTransform, TransformContext } from '../transform';+import { type ExpressionNode, type SimpleExpressionNode } from '../ast';+export declare const transformExpression: NodeTransform;+export declare function processExpression(node: SimpleExpressionNode, context: TransformContext, asParams?: boolean, asRawStatements?: boolean, localVars?: Record<string, number>): ExpressionNode;+export declare function stringifyExpression(exp: ExpressionNode | string): string;packages/compiler-core/src/transforms/transformSlotOutlet.d.tsnew file mode 100644index 000000000..54282a804@@ -0,0 +1,10 @@+import type { NodeTransform, TransformContext } from '../transform';+import { type ExpressionNode, type SlotOutletNode } from '../ast';+import { type PropsExpression } from './transformElement';+export declare const transformSlotOutlet: NodeTransform;+interface SlotOutletProcessResult {+    slotName: string | ExpressionNode;+    slotProps: PropsExpression | undefined;+}+export declare function processSlotOutlet(node: SlotOutletNode, context: TransformContext): SlotOutletProcessResult;+export {};packages/compiler-core/src/transforms/transformText.d.tsnew file mode 100644index 000000000..73a99371a@@ -0,0 +1,2 @@+import type { NodeTransform } from '../transform';+export declare const transformText: NodeTransform;packages/compiler-core/src/transforms/transformVBindShorthand.d.tsnew file mode 100644index 000000000..e9e1cecd3@@ -0,0 +1,2 @@+import type { NodeTransform } from '../transform';+export declare const transformVBindShorthand: NodeTransform;packages/compiler-core/src/transforms/vBind.d.tsnew file mode 100644index 000000000..7261d2788@@ -0,0 +1,2 @@+import type { DirectiveTransform } from '../transform';+export declare const transformBind: DirectiveTransform;packages/compiler-core/src/transforms/vFor.d.tsnew file mode 100644index 000000000..a035c186d@@ -0,0 +1,6 @@+import { type NodeTransform, type TransformContext } from '../transform';+import { type DirectiveNode, type ElementNode, type ExpressionNode, type ForNode, type ForParseResult } from '../ast';+export declare const transformFor: NodeTransform;+export declare function processFor(node: ElementNode, dir: DirectiveNode, context: TransformContext, processCodegen?: (forNode: ForNode) => (() => void) | undefined): (() => void) | undefined;+export declare function finalizeForParseResult(result: ForParseResult, context: TransformContext): void;+export declare function createForLoopParams({ value, key, index }: ForParseResult, memoArgs?: ExpressionNode[]): ExpressionNode[];packages/compiler-core/src/transforms/vIf.d.tsnew file mode 100644index 000000000..be03953af@@ -0,0 +1,4 @@+import { type NodeTransform, type TransformContext } from '../transform';+import { type DirectiveNode, type ElementNode, type IfBranchNode, type IfNode } from '../ast';+export declare const transformIf: NodeTransform;+export declare function processIf(node: ElementNode, dir: DirectiveNode, context: TransformContext, processCodegen?: (node: IfNode, branch: IfBranchNode, isRoot: boolean) => (() => void) | undefined): (() => void) | undefined;packages/compiler-core/src/transforms/vMemo.d.tsnew file mode 100644index 000000000..838c78219@@ -0,0 +1,2 @@+import type { NodeTransform } from '../transform';+export declare const transformMemo: NodeTransform;packages/compiler-core/src/transforms/vModel.d.tsnew file mode 100644index 000000000..50a330bac@@ -0,0 +1,2 @@+import type { DirectiveTransform } from '../transform';+export declare const transformModel: DirectiveTransform;packages/compiler-core/src/transforms/vOn.d.tsnew file mode 100644index 000000000..ab4b132dd@@ -0,0 +1,7 @@+import type { DirectiveTransform } from '../transform';+import { type DirectiveNode, type ExpressionNode, type SimpleExpressionNode } from '../ast';+export interface VOnDirectiveNode extends DirectiveNode {+    arg: ExpressionNode;+    exp: SimpleExpressionNode | undefined;+}+export declare const transformOn: DirectiveTransform;packages/compiler-core/src/transforms/vOnce.d.tsnew file mode 100644index 000000000..c98b9d51c@@ -0,0 +1,2 @@+import type { NodeTransform } from '../transform';+export declare const transformOnce: NodeTransform;packages/compiler-core/src/transforms/vSlot.d.tsnew file mode 100644index 000000000..cac356fcd@@ -0,0 +1,9 @@+import { type DirectiveNode, type ElementNode, type ExpressionNode, type FunctionExpression, type SlotsExpression, type SourceLocation, type TemplateChildNode } from '../ast';+import type { NodeTransform, TransformContext } from '../transform';+export declare const trackSlotScopes: NodeTransform;+export declare const trackVForSlotScopes: NodeTransform;+export type SlotFnBuilder = (slotProps: ExpressionNode | undefined, vFor: DirectiveNode | undefined, slotChildren: TemplateChildNode[], loc: SourceLocation) => FunctionExpression;+export declare function buildSlots(node: ElementNode, context: TransformContext, buildSlotFn?: SlotFnBuilder): {+    slots: SlotsExpression;+    hasDynamicSlots: boolean;+};packages/compiler-core/src/utils.d.tsnew file mode 100644index 000000000..97f5c5787@@ -0,0 +1,38 @@+import { type BlockCodegenNode, type CacheExpression, type DirectiveNode, type ElementNode, type ExpressionNode, type IfBranchNode, type InterpolationNode, type JSChildNode, type MemoExpression, type Position, type Property, type RenderSlotCall, type RootNode, type SimpleExpressionNode, type SlotOutletNode, type TemplateChildNode, type TemplateNode, type TextNode, type VNodeCall } from './ast';+import type { TransformContext } from './transform';+export declare const isStaticExp: (p: JSChildNode) => p is SimpleExpressionNode;+export declare function isCoreComponent(tag: string): symbol | void;+export declare const isSimpleIdentifier: (name: string) => boolean;+export declare const validFirstIdentCharRE: RegExp;+/**+ * Simple lexer to check if an expression is a member expression. This is+ * lax and only checks validity at the root level (i.e. does not validate exps+ * inside square brackets), but it's ok since these are only used on template+ * expressions and false positives are invalid expressions in the first place.+ */+export declare const isMemberExpressionBrowser: (exp: ExpressionNode) => boolean;+export declare const isMemberExpressionNode: (exp: ExpressionNode, context: TransformContext) => boolean;+export declare const isMemberExpression: (exp: ExpressionNode, context: TransformContext) => boolean;+export declare const isFnExpressionBrowser: (exp: ExpressionNode) => boolean;+export declare const isFnExpressionNode: (exp: ExpressionNode, context: TransformContext) => boolean;+export declare const isFnExpression: (exp: ExpressionNode, context: TransformContext) => boolean;+export declare function advancePositionWithClone(pos: Position, source: string, numberOfCharacters?: number): Position;+export declare function advancePositionWithMutation(pos: Position, source: string, numberOfCharacters?: number): Position;+export declare function assert(condition: boolean, msg?: string): void;+export declare function findDir(node: ElementNode, name: string | RegExp, allowEmpty?: boolean): DirectiveNode | undefined;+export declare function findProp(node: ElementNode, name: string, dynamicOnly?: boolean, allowEmpty?: boolean): ElementNode['props'][0] | undefined;+export declare function isStaticArgOf(arg: DirectiveNode['arg'], name: string): boolean;+export declare function hasDynamicKeyVBind(node: ElementNode): boolean;+export declare function isText(node: TemplateChildNode): node is TextNode | InterpolationNode;+export declare function isVPre(p: ElementNode['props'][0]): p is DirectiveNode;+export declare function isVSlot(p: ElementNode['props'][0]): p is DirectiveNode;+export declare function isTemplateNode(node: RootNode | TemplateChildNode): node is TemplateNode;+export declare function isSlotOutlet(node: RootNode | TemplateChildNode): node is SlotOutletNode;+export declare function injectProp(node: VNodeCall | RenderSlotCall, prop: Property, context: TransformContext): void;+export declare function toValidAssetId(name: string, type: 'component' | 'directive' | 'filter'): string;+export declare function hasScopeRef(node: TemplateChildNode | IfBranchNode | ExpressionNode | CacheExpression | undefined, ids: TransformContext['identifiers']): boolean;+export declare function getMemoedVNodeCall(node: BlockCodegenNode | MemoExpression): VNodeCall | RenderSlotCall;+export declare const forAliasRE: RegExp;+export declare function isAllWhitespace(str: string): boolean;+export declare function isWhitespaceText(node: TemplateChildNode): boolean;+export declare function isCommentOrWhitespace(node: TemplateChildNode): boolean;packages/compiler-core/src/validateExpression.d.tsnew file mode 100644index 000000000..2b81be739@@ -0,0 +1,8 @@+import type { SimpleExpressionNode } from './ast';+import type { TransformContext } from './transform';+/**+ * Validate a non-prefixed expression.+ * This is only called when using the in-browser runtime compiler since it+ * doesn't prefix expressions.+ */+export declare function validateBrowserExpression(node: SimpleExpressionNode, context: TransformContext, asParams?: boolean, asRawStatements?: boolean): void;packages/reactivity/src/arrayInstrumentations.d.tsnew file mode 100644index 000000000..e574feccd@@ -0,0 +1,11 @@+/**+ * Track array iteration and return:+ * - if input is reactive: a cloned raw array with reactive values+ * - if input is non-reactive or shallowReactive: the original raw array+ */+export declare function reactiveReadArray<T>(array: T[]): T[];+/**+ * Track array iteration and return raw array+ */+export declare function shallowReadArray<T>(arr: T[]): T[];+export declare const arrayInstrumentations: Record<string | symbol, Function>;packages/reactivity/src/baseHandlers.d.tsnew file mode 100644index 000000000..364491259@@ -0,0 +1,24 @@+import { type Target } from './reactive';+declare class BaseReactiveHandler implements ProxyHandler<Target> {+    protected readonly _isReadonly: boolean;+    protected readonly _isShallow: boolean;+    constructor(_isReadonly?: boolean, _isShallow?: boolean);+    get(target: Target, key: string | symbol, receiver: object): any;+}+declare class MutableReactiveHandler extends BaseReactiveHandler {+    constructor(isShallow?: boolean);+    set(target: Record<string | symbol, unknown>, key: string | symbol, value: unknown, receiver: object): boolean;+    deleteProperty(target: Record<string | symbol, unknown>, key: string | symbol): boolean;+    has(target: Record<string | symbol, unknown>, key: string | symbol): boolean;+    ownKeys(target: Record<string | symbol, unknown>): (string | symbol)[];+}+declare class ReadonlyReactiveHandler extends BaseReactiveHandler {+    constructor(isShallow?: boolean);+    set(target: object, key: string | symbol): boolean;+    deleteProperty(target: object, key: string | symbol): boolean;+}+export declare const mutableHandlers: ProxyHandler<object>;+export declare const readonlyHandlers: ProxyHandler<object>;+export declare const shallowReactiveHandlers: MutableReactiveHandler;+export declare const shallowReadonlyHandlers: ReadonlyReactiveHandler;+export {};packages/reactivity/src/collectionHandlers.d.tsnew file mode 100644index 000000000..038bd0c70@@ -0,0 +1,9 @@+import { type Target } from './reactive';+type CollectionTypes = IterableCollections | WeakCollections;+type IterableCollections = (Map<any, any> | Set<any>) & Target;+type WeakCollections = (WeakMap<any, any> | WeakSet<any>) & Target;+export declare const mutableCollectionHandlers: ProxyHandler<CollectionTypes>;+export declare const shallowCollectionHandlers: ProxyHandler<CollectionTypes>;+export declare const readonlyCollectionHandlers: ProxyHandler<CollectionTypes>;+export declare const shallowReadonlyCollectionHandlers: ProxyHandler<CollectionTypes>;+export {};packages/reactivity/src/computed.d.tsnew file mode 100644index 000000000..33851660b@@ -0,0 +1,123 @@+import { type DebuggerEvent, type DebuggerOptions, EffectFlags, type Subscriber } from './effect';+import type { Ref } from './ref';+import { Dep, type Link } from './dep';+declare const ComputedRefSymbol: unique symbol;+declare const WritableComputedRefSymbol: unique symbol;+interface BaseComputedRef<T, S = T> extends Ref<T, S> {+    [ComputedRefSymbol]: true;+    /**+     * @deprecated computed no longer uses effect+     */+    effect: ComputedRefImpl;+}+export interface ComputedRef<T = any> extends BaseComputedRef<T> {+    readonly value: T;+}+export interface WritableComputedRef<T, S = T> extends BaseComputedRef<T, S> {+    [WritableComputedRefSymbol]: true;+}+export type ComputedGetter<T> = (oldValue?: T) => T;+export type ComputedSetter<T> = (newValue: T) => void;+export interface WritableComputedOptions<T, S = T> {+    get: ComputedGetter<T>;+    set: ComputedSetter<S>;+}+/**+ * @private exported by @vue/reactivity for Vue core use, but not exported from+ * the main vue package+ */+export declare class ComputedRefImpl<T = any> implements Subscriber {+    fn: ComputedGetter<T>;+    private readonly setter;+    /**+     * @internal+     */+    _value: any;+    /**+     * @internal+     */+    readonly dep: Dep;+    /**+     * @internal+     */+    readonly __v_isRef = true;+    /**+     * @internal+     */+    readonly __v_isReadonly: boolean;+    /**+     * @internal+     */+    deps?: Link;+    /**+     * @internal+     */+    depsTail?: Link;+    /**+     * @internal+     */+    flags: EffectFlags;+    /**+     * @internal+     */+    globalVersion: number;+    /**+     * @internal+     */+    isSSR: boolean;+    /**+     * @internal+     */+    next?: Subscriber;+    effect: this;+    onTrack?: (event: DebuggerEvent) => void;+    onTrigger?: (event: DebuggerEvent) => void;+    /**+     * Dev only+     * @internal+     */+    _warnRecursive?: boolean;+    constructor(fn: ComputedGetter<T>, setter: ComputedSetter<T> | undefined, isSSR: boolean);+    /**+     * @internal+     */+    notify(): true | void;+    get value(): T;+    set value(newValue: T);+}+/**+ * Takes a getter function and returns a readonly reactive ref object for the+ * returned value from the getter. It can also take an object with get and set+ * functions to create a writable ref object.+ *+ * @example+ * ```js+ * // Creating a readonly computed ref:+ * const count = ref(1)+ * const plusOne = computed(() => count.value + 1)+ *+ * console.log(plusOne.value) // 2+ * plusOne.value++ // error+ * ```+ *+ * ```js+ * // Creating a writable computed ref:+ * const count = ref(1)+ * const plusOne = computed({+ *   get: () => count.value + 1,+ *   set: (val) => {+ *     count.value = val - 1+ *   }+ * })+ *+ * plusOne.value = 1+ * console.log(count.value) // 0+ * ```+ *+ * @param getter - Function that produces the next value.+ * @param debugOptions - For debugging. See {@link https://vuejs.org/guide/extras/reactivity-in-depth.html#computed-debugging}.+ * @see {@link https://vuejs.org/api/reactivity-core.html#computed}+ */+export declare function computed<T>(getter: ComputedGetter<T>, debugOptions?: DebuggerOptions): ComputedRef<T>;+export declare function computed<T, S = T>(options: WritableComputedOptions<T, S>, debugOptions?: DebuggerOptions): WritableComputedRef<T, S>;+export {};packages/reactivity/src/constants.d.tsnew file mode 100644index 000000000..df20f439f@@ -0,0 +1,19 @@+export declare enum TrackOpTypes {+    GET = "get",+    HAS = "has",+    ITERATE = "iterate"+}+export declare enum TriggerOpTypes {+    SET = "set",+    ADD = "add",+    DELETE = "delete",+    CLEAR = "clear"+}+export declare enum ReactiveFlags {+    SKIP = "__v_skip",+    IS_REACTIVE = "__v_isReactive",+    IS_READONLY = "__v_isReadonly",+    IS_SHALLOW = "__v_isShallow",+    RAW = "__v_raw",+    IS_REF = "__v_isRef"+}packages/reactivity/src/dep.d.tsnew file mode 100644index 000000000..7b6c6025c@@ -0,0 +1,104 @@+import type { ComputedRefImpl } from './computed';+import { type TrackOpTypes, TriggerOpTypes } from './constants';+import { type DebuggerEventExtraInfo, type Subscriber } from './effect';+/**+ * Incremented every time a reactive change happens+ * This is used to give computed a fast path to avoid re-compute when nothing+ * has changed.+ */+export declare let globalVersion: number;+/**+ * Represents a link between a source (Dep) and a subscriber (Effect or Computed).+ * Deps and subs have a many-to-many relationship - each link between a+ * dep and a sub is represented by a Link instance.+ *+ * A Link is also a node in two doubly-linked lists - one for the associated+ * sub to track all its deps, and one for the associated dep to track all its+ * subs.+ *+ * @internal+ */+export declare class Link {+    sub: Subscriber;+    dep: Dep;+    /**+     * - Before each effect run, all previous dep links' version are reset to -1+     * - During the run, a link's version is synced with the source dep on access+     * - After the run, links with version -1 (that were never used) are cleaned+     *   up+     */+    version: number;+    /**+     * Pointers for doubly-linked lists+     */+    nextDep?: Link;+    prevDep?: Link;+    nextSub?: Link;+    prevSub?: Link;+    prevActiveLink?: Link;+    constructor(sub: Subscriber, dep: Dep);+}+/**+ * @internal+ */+export declare class Dep {+    computed?: ComputedRefImpl | undefined;+    version: number;+    /**+     * Link between this dep and the current active effect+     */+    activeLink?: Link;+    /**+     * Doubly linked list representing the subscribing effects (tail)+     */+    subs?: Link;+    /**+     * Doubly linked list representing the subscribing effects (head)+     * DEV only, for invoking onTrigger hooks in correct order+     */+    subsHead?: Link;+    /**+     * For object property deps cleanup+     */+    map?: KeyToDepMap;+    key?: unknown;+    /**+     * Subscriber counter+     */+    sc: number;+    /**+     * @internal+     */+    readonly __v_skip = true;+    constructor(computed?: ComputedRefImpl | undefined);+    track(debugInfo?: DebuggerEventExtraInfo): Link | undefined;+    trigger(debugInfo?: DebuggerEventExtraInfo): void;+    notify(debugInfo?: DebuggerEventExtraInfo): void;+}+type KeyToDepMap = Map<any, Dep>;+export declare const targetMap: WeakMap<object, KeyToDepMap>;+export declare const ITERATE_KEY: unique symbol;+export declare const MAP_KEY_ITERATE_KEY: unique symbol;+export declare const ARRAY_ITERATE_KEY: unique symbol;+/**+ * Tracks access to a reactive property.+ *+ * This will check which effect is running at the moment and record it as dep+ * which records all effects that depend on the reactive property.+ *+ * @param target - Object holding the reactive property.+ * @param type - Defines the type of access to the reactive property.+ * @param key - Identifier of the reactive property to track.+ */+export declare function track(target: object, type: TrackOpTypes, key: unknown): void;+/**+ * Finds all deps associated with the target (or a specific property) and+ * triggers the effects stored within.+ *+ * @param target - The reactive object.+ * @param type - Defines the type of the operation that needs to trigger effects.+ * @param key - Can be used to target a specific reactive property in the target object.+ */+export declare function trigger(target: object, type: TriggerOpTypes, key?: unknown, newValue?: unknown, oldValue?: unknown, oldTarget?: Map<unknown, unknown> | Set<unknown>): void;+export declare function getDepFromReactive(object: any, key: string | number | symbol): Dep | undefined;+export {};packages/reactivity/src/effect.d.tsnew file mode 100644index 000000000..cd584dc89@@ -0,0 +1,164 @@+import type { ComputedRefImpl } from './computed';+import type { TrackOpTypes, TriggerOpTypes } from './constants';+import { type Link } from './dep';+export type EffectScheduler = (...args: any[]) => any;+export type DebuggerEvent = {+    effect: Subscriber;+} & DebuggerEventExtraInfo;+export type DebuggerEventExtraInfo = {+    target: object;+    type: TrackOpTypes | TriggerOpTypes;+    key: any;+    newValue?: any;+    oldValue?: any;+    oldTarget?: Map<any, any> | Set<any>;+};+export interface DebuggerOptions {+    onTrack?: (event: DebuggerEvent) => void;+    onTrigger?: (event: DebuggerEvent) => void;+}+export interface ReactiveEffectOptions extends DebuggerOptions {+    scheduler?: EffectScheduler;+    allowRecurse?: boolean;+    onStop?: () => void;+}+export interface ReactiveEffectRunner<T = any> {+    (): T;+    effect: ReactiveEffect;+}+export declare let activeSub: Subscriber | undefined;+export declare enum EffectFlags {+    /**+     * ReactiveEffect only+     */+    ACTIVE = 1,+    RUNNING = 2,+    TRACKING = 4,+    NOTIFIED = 8,+    DIRTY = 16,+    ALLOW_RECURSE = 32,+    PAUSED = 64,+    EVALUATED = 128+}+/**+ * Subscriber is a type that tracks (or subscribes to) a list of deps.+ */+export interface Subscriber extends DebuggerOptions {+    /**+     * Head of the doubly linked list representing the deps+     * @internal+     */+    deps?: Link;+    /**+     * Tail of the same list+     * @internal+     */+    depsTail?: Link;+    /**+     * @internal+     */+    flags: EffectFlags;+    /**+     * @internal+     */+    next?: Subscriber;+    /**+     * returning `true` indicates it's a computed that needs to call notify+     * on its dep too+     * @internal+     */+    notify(): true | void;+}+export declare class ReactiveEffect<T = any> implements Subscriber, ReactiveEffectOptions {+    fn: () => T;+    /**+     * @internal+     */+    deps?: Link;+    /**+     * @internal+     */+    depsTail?: Link;+    /**+     * @internal+     */+    flags: EffectFlags;+    /**+     * @internal+     */+    next?: Subscriber;+    /**+     * @internal+     */+    cleanup?: () => void;+    scheduler?: EffectScheduler;+    onStop?: () => void;+    onTrack?: (event: DebuggerEvent) => void;+    onTrigger?: (event: DebuggerEvent) => void;+    constructor(fn: () => T);+    pause(): void;+    resume(): void;+    /**+     * @internal+     */+    notify(): void;+    run(): T;+    stop(): void;+    trigger(): void;+    /**+     * @internal+     */+    runIfDirty(): void;+    get dirty(): boolean;+}+export declare function batch(sub: Subscriber, isComputed?: boolean): void;+/**+ * @internal+ */+export declare function startBatch(): void;+/**+ * Run batched effects when all batches have ended+ * @internal+ */+export declare function endBatch(): void;+/**+ * Returning false indicates the refresh failed+ * @internal+ */+export declare function refreshComputed(computed: ComputedRefImpl): undefined;+export declare function effect<T = any>(fn: () => T, options?: ReactiveEffectOptions): ReactiveEffectRunner<T>;+/**+ * Stops the effect associated with the given runner.+ *+ * @param runner - Association with the effect to stop tracking.+ */+export declare function stop(runner: ReactiveEffectRunner): void;+/**+ * @internal+ */+export declare let shouldTrack: boolean;+/**+ * Temporarily pauses tracking.+ */+export declare function pauseTracking(): void;+/**+ * Re-enables effect tracking (if it was paused).+ */+export declare function enableTracking(): void;+/**+ * Resets the previous global effect tracking state.+ */+export declare function resetTracking(): void;+/**+ * Registers a cleanup function for the current active effect.+ * The cleanup function is called right before the next effect run, or when the+ * effect is stopped.+ *+ * Throws a warning if there is no current active effect. The warning can be+ * suppressed by passing `true` to the second argument.+ *+ * @param fn - the cleanup function to be registered+ * @param failSilently - if `true`, will not throw warning when called without+ * an active effect.+ */+export declare function onEffectCleanup(fn: () => void, failSilently?: boolean): void;packages/reactivity/src/effectScope.d.tsnew file mode 100644index 000000000..a0a08ec05@@ -0,0 +1,84 @@+import type { ReactiveEffect } from './effect';+export declare let activeEffectScope: EffectScope | undefined;+export declare class EffectScope {+    detached: boolean;+    /**+     * @internal+     */+    private _active;+    /**+     * @internal track `on` calls, allow `on` call multiple times+     */+    private _on;+    /**+     * @internal+     */+    effects: ReactiveEffect[];+    /**+     * @internal+     */+    cleanups: (() => void)[];+    private _isPaused;+    private _warnOnRun;+    /**+     * only assigned by undetached scope+     * @internal+     */+    parent: EffectScope | undefined;+    /**+     * record undetached scopes+     * @internal+     */+    scopes: EffectScope[] | undefined;+    /**+     * track a child scope's index in its parent's scopes array for optimized+     * removal+     * @internal+     */+    private index;+    readonly __v_skip = true;+    constructor(detached?: boolean);+    get active(): boolean;+    pause(): void;+    /**+     * Resumes the effect scope, including all child scopes and effects.+     */+    resume(): void;+    run<T>(fn: () => T): T | undefined;+    prevScope: EffectScope | undefined;+    /**+     * This should only be called on non-detached scopes+     * @internal+     */+    on(): void;+    /**+     * This should only be called on non-detached scopes+     * @internal+     */+    off(): void;+    stop(fromParent?: boolean): void;+}+/**+ * Creates an effect scope object which can capture the reactive effects (i.e.+ * computed and watchers) created within it so that these effects can be+ * disposed together. For detailed use cases of this API, please consult its+ * corresponding {@link https://github.com/vuejs/rfcs/blob/master/active-rfcs/0041-reactivity-effect-scope.md | RFC}.+ *+ * @param detached - Can be used to create a "detached" effect scope.+ * @see {@link https://vuejs.org/api/reactivity-advanced.html#effectscope}+ */+export declare function effectScope(detached?: boolean): EffectScope;+/**+ * Returns the current active effect scope if there is one.+ *+ * @see {@link https://vuejs.org/api/reactivity-advanced.html#getcurrentscope}+ */+export declare function getCurrentScope(): EffectScope | undefined;+/**+ * Registers a dispose callback on the current active effect scope. The+ * callback will be invoked when the associated effect scope is stopped.+ *+ * @param fn - The callback function to attach to the scope's cleanup.+ * @see {@link https://vuejs.org/api/reactivity-advanced.html#onscopedispose}+ */+export declare function onScopeDispose(fn: () => void, failSilently?: boolean): void;packages/reactivity/src/index.d.tsnew file mode 100644index 000000000..f2dc9ae55@@ -0,0 +1,9 @@+export { ref, shallowRef, isRef, toRef, toValue, toRefs, unref, proxyRefs, customRef, triggerRef, type Ref, type MaybeRef, type MaybeRefOrGetter, type ToRef, type ToRefs, type UnwrapRef, type ShallowRef, type ShallowUnwrapRef, type RefUnwrapBailTypes, type CustomRefFactory, } from './ref';+export { reactive, readonly, isReactive, isReadonly, isShallow, isProxy, shallowReactive, shallowReadonly, markRaw, toRaw, toReactive, toReadonly, type Raw, type DeepReadonly, type ShallowReactive, type UnwrapNestedRefs, type Reactive, type ReactiveMarker, } from './reactive';+export { computed, type ComputedRef, type WritableComputedRef, type WritableComputedOptions, type ComputedGetter, type ComputedSetter, type ComputedRefImpl, } from './computed';+export { effect, stop, enableTracking, pauseTracking, resetTracking, onEffectCleanup, ReactiveEffect, EffectFlags, type ReactiveEffectRunner, type ReactiveEffectOptions, type EffectScheduler, type DebuggerOptions, type DebuggerEvent, type DebuggerEventExtraInfo, } from './effect';+export { trigger, track, ITERATE_KEY, ARRAY_ITERATE_KEY, MAP_KEY_ITERATE_KEY, } from './dep';+export { effectScope, EffectScope, getCurrentScope, onScopeDispose, } from './effectScope';+export { reactiveReadArray, shallowReadArray } from './arrayInstrumentations';+export { TrackOpTypes, TriggerOpTypes, ReactiveFlags } from './constants';+export { watch, getCurrentWatcher, traverse, onWatcherCleanup, WatchErrorCodes, type WatchOptions, type WatchScheduler, type WatchStopHandle, type WatchHandle, type WatchEffect, type WatchSource, type WatchCallback, type OnCleanup, } from './watch';packages/reactivity/src/reactive.d.tsnew file mode 100644index 000000000..86899d1f4@@ -0,0 +1,244 @@+import type { RawSymbol, Ref, UnwrapRefSimple } from './ref';+import { ReactiveFlags } from './constants';+export interface Target {+    [ReactiveFlags.SKIP]?: boolean;+    [ReactiveFlags.IS_REACTIVE]?: boolean;+    [ReactiveFlags.IS_READONLY]?: boolean;+    [ReactiveFlags.IS_SHALLOW]?: boolean;+    [ReactiveFlags.RAW]?: any;+}+export declare const reactiveMap: WeakMap<Target, any>;+export declare const shallowReactiveMap: WeakMap<Target, any>;+export declare const readonlyMap: WeakMap<Target, any>;+export declare const shallowReadonlyMap: WeakMap<Target, any>;+export type UnwrapNestedRefs<T> = T extends Ref ? T : UnwrapRefSimple<T>;+declare const ReactiveMarkerSymbol: unique symbol;+export interface ReactiveMarker {+    [ReactiveMarkerSymbol]?: void;+}+export type Reactive<T> = UnwrapNestedRefs<T> & (T extends readonly any[] ? ReactiveMarker : {});+/**+ * Returns a reactive proxy of the object.+ *+ * The reactive conversion is "deep": it affects all nested properties. A+ * reactive object also deeply unwraps any properties that are refs while+ * maintaining reactivity.+ *+ * @example+ * ```js+ * const obj = reactive({ count: 0 })+ * ```+ *+ * @param target - The source object.+ * @see {@link https://vuejs.org/api/reactivity-core.html#reactive}+ */+export declare function reactive<T extends object>(target: T): Reactive<T>;+declare class ShallowReactiveBrandClass {+    private __shallowReactiveBrand?;+}+export type ShallowReactiveBrand = ShallowReactiveBrandClass;+export type ShallowReactive<T> = T & ShallowReactiveBrand;+/**+ * Shallow version of {@link reactive}.+ *+ * Unlike {@link reactive}, there is no deep conversion: only root-level+ * properties are reactive for a shallow reactive object. Property values are+ * stored and exposed as-is - this also means properties with ref values will+ * not be automatically unwrapped.+ *+ * @example+ * ```js+ * const state = shallowReactive({+ *   foo: 1,+ *   nested: {+ *     bar: 2+ *   }+ * })+ *+ * // mutating state's own properties is reactive+ * state.foo+++ *+ * // ...but does not convert nested objects+ * isReactive(state.nested) // false+ *+ * // NOT reactive+ * state.nested.bar+++ * ```+ *+ * @param target - The source object.+ * @see {@link https://vuejs.org/api/reactivity-advanced.html#shallowreactive}+ */+export declare function shallowReactive<T extends object>(target: T): ShallowReactive<T>;+type Primitive = string | number | boolean | bigint | symbol | undefined | null;+export type Builtin = Primitive | Function | Date | Error | RegExp;+export type DeepReadonly<T> = T extends Builtin ? T : T extends Map<infer K, infer V> ? ReadonlyMap<DeepReadonly<K>, DeepReadonly<V>> : T extends ReadonlyMap<infer K, infer V> ? ReadonlyMap<DeepReadonly<K>, DeepReadonly<V>> : T extends WeakMap<infer K, infer V> ? WeakMap<DeepReadonly<K>, DeepReadonly<V>> : T extends Set<infer U> ? ReadonlySet<DeepReadonly<U>> : T extends ReadonlySet<infer U> ? ReadonlySet<DeepReadonly<U>> : T extends WeakSet<infer U> ? WeakSet<DeepReadonly<U>> : T extends Promise<infer U> ? Promise<DeepReadonly<U>> : T extends Ref<infer U, unknown> ? Readonly<Ref<DeepReadonly<U>>> : T extends {} ? {+    readonly [K in keyof T]: DeepReadonly<T[K]>;+} : Readonly<T>;+/**+ * Takes an object (reactive or plain) or a ref and returns a readonly proxy to+ * the original.+ *+ * A readonly proxy is deep: any nested property accessed will be readonly as+ * well. It also has the same ref-unwrapping behavior as {@link reactive},+ * except the unwrapped values will also be made readonly.+ *+ * @example+ * ```js+ * const original = reactive({ count: 0 })+ *+ * const copy = readonly(original)+ *+ * watchEffect(() => {+ *   // works for reactivity tracking+ *   console.log(copy.count)+ * })+ *+ * // mutating original will trigger watchers relying on the copy+ * original.count+++ *+ * // mutating the copy will fail and result in a warning+ * copy.count++ // warning!+ * ```+ *+ * @param target - The source object.+ * @see {@link https://vuejs.org/api/reactivity-core.html#readonly}+ */+export declare function readonly<T extends object>(target: T): DeepReadonly<UnwrapNestedRefs<T>>;+/**+ * Shallow version of {@link readonly}.+ *+ * Unlike {@link readonly}, there is no deep conversion: only root-level+ * properties are made readonly. Property values are stored and exposed as-is -+ * this also means properties with ref values will not be automatically+ * unwrapped.+ *+ * @example+ * ```js+ * const state = shallowReadonly({+ *   foo: 1,+ *   nested: {+ *     bar: 2+ *   }+ * })+ *+ * // mutating state's own properties will fail+ * state.foo+++ *+ * // ...but works on nested objects+ * isReadonly(state.nested) // false+ *+ * // works+ * state.nested.bar+++ * ```+ *+ * @param target - The source object.+ * @see {@link https://vuejs.org/api/reactivity-advanced.html#shallowreadonly}+ */+export declare function shallowReadonly<T extends object>(target: T): Readonly<T>;+/**+ * Checks if an object is a proxy created by {@link reactive} or+ * {@link shallowReactive} (or {@link ref} in some cases).+ *+ * @example+ * ```js+ * isReactive(reactive({}))            // => true+ * isReactive(readonly(reactive({})))  // => true+ * isReactive(ref({}).value)           // => true+ * isReactive(readonly(ref({})).value) // => true+ * isReactive(ref(true))               // => false+ * isReactive(shallowRef({}).value)    // => false+ * isReactive(shallowReactive({}))     // => true+ * ```+ *+ * @param value - The value to check.+ * @see {@link https://vuejs.org/api/reactivity-utilities.html#isreactive}+ */+export declare function isReactive(value: unknown): boolean;+/**+ * Checks whether the passed value is a readonly object. The properties of a+ * readonly object can change, but they can't be assigned directly via the+ * passed object.+ *+ * The proxies created by {@link readonly} and {@link shallowReadonly} are+ * both considered readonly, as is a computed ref without a set function.+ *+ * @param value - The value to check.+ * @see {@link https://vuejs.org/api/reactivity-utilities.html#isreadonly}+ */+export declare function isReadonly(value: unknown): boolean;+export declare function isShallow(value: unknown): boolean;+/**+ * Checks if an object is a proxy created by {@link reactive},+ * {@link readonly}, {@link shallowReactive} or {@link shallowReadonly}.+ *+ * @param value - The value to check.+ * @see {@link https://vuejs.org/api/reactivity-utilities.html#isproxy}+ */+export declare function isProxy(value: any): boolean;+/**+ * Returns the raw, original object of a Vue-created proxy.+ *+ * `toRaw()` can return the original object from proxies created by+ * {@link reactive}, {@link readonly}, {@link shallowReactive} or+ * {@link shallowReadonly}.+ *+ * This is an escape hatch that can be used to temporarily read without+ * incurring proxy access / tracking overhead or write without triggering+ * changes. It is **not** recommended to hold a persistent reference to the+ * original object. Use with caution.+ *+ * @example+ * ```js+ * const foo = {}+ * const reactiveFoo = reactive(foo)+ *+ * console.log(toRaw(reactiveFoo) === foo) // true+ * ```+ *+ * @param observed - The object for which the "raw" value is requested.+ * @see {@link https://vuejs.org/api/reactivity-advanced.html#toraw}+ */+export declare function toRaw<T>(observed: T): T;+export type Raw<T> = T & {+    [RawSymbol]?: true;+};+/**+ * Marks an object so that it will never be converted to a proxy. Returns the+ * object itself.+ *+ * @example+ * ```js+ * const foo = markRaw({})+ * console.log(isReactive(reactive(foo))) // false+ *+ * // also works when nested inside other reactive objects+ * const bar = reactive({ foo })+ * console.log(isReactive(bar.foo)) // false+ * ```+ *+ * **Warning:** `markRaw()` together with the shallow APIs such as+ * {@link shallowReactive} allow you to selectively opt-out of the default+ * deep reactive/readonly conversion and embed raw, non-proxied objects in your+ * state graph.+ *+ * @param value - The object to be marked as "raw".+ * @see {@link https://vuejs.org/api/reactivity-advanced.html#markraw}+ */+export declare function markRaw<T extends object>(value: T): Raw<T>;+/**+ * Returns a reactive proxy of the given value (if possible).+ *+ * If the given value is not an object, the original value itself is returned.+ *+ * @param value - The value for which a reactive proxy shall be created.+ */+export declare const toReactive: <T extends unknown>(value: T) => T;+/**+ * Returns a readonly proxy of the given value (if possible).+ *+ * If the given value is not an object, the original value itself is returned.+ *+ * @param value - The value for which a readonly proxy shall be created.+ */+export declare const toReadonly: <T extends unknown>(value: T) => DeepReadonly<T>;+export {};packages/reactivity/src/ref.d.tsnew file mode 100644index 000000000..3ac6358ff@@ -0,0 +1,227 @@+import { type IfAny } from '@vue/shared';+import { type Builtin, type ShallowReactiveBrand } from './reactive';+import type { ComputedRef, WritableComputedRef } from './computed';+declare const RefSymbol: unique symbol;+export declare const RawSymbol: unique symbol;+export interface Ref<T = any, S = T> {+    get value(): T;+    set value(_: S);+    /**+     * Type differentiator only.+     * We need this to be in public d.ts but don't want it to show up in IDE+     * autocomplete, so we use a private Symbol instead.+     */+    [RefSymbol]: true;+}+/**+ * Checks if a value is a ref object.+ *+ * @param r - The value to inspect.+ * @see {@link https://vuejs.org/api/reactivity-utilities.html#isref}+ */+export declare function isRef<T>(r: Ref<T> | unknown): r is Ref<T>;+/**+ * Takes an inner value and returns a reactive and mutable ref object, which+ * has a single property `.value` that points to the inner value.+ *+ * @param value - The object to wrap in the ref.+ * @see {@link https://vuejs.org/api/reactivity-core.html#ref}+ */+export declare function ref<T>(value: T): [T] extends [Ref] ? IfAny<T, Ref<T>, T> : Ref<UnwrapRef<T>, UnwrapRef<T> | T>;+export declare function ref<T = any>(): Ref<T | undefined>;+declare const ShallowRefMarker: unique symbol;+export type ShallowRef<T = any, S = T> = Ref<T, S> & {+    [ShallowRefMarker]?: true;+};+/**+ * Shallow version of {@link ref}.+ *+ * @example+ * ```js+ * const state = shallowRef({ count: 1 })+ *+ * // does NOT trigger change+ * state.value.count = 2+ *+ * // does trigger change+ * state.value = { count: 2 }+ * ```+ *+ * @param value - The "inner value" for the shallow ref.+ * @see {@link https://vuejs.org/api/reactivity-advanced.html#shallowref}+ */+export declare function shallowRef<T>(value: T): Ref extends T ? T extends Ref ? IfAny<T, ShallowRef<T>, T> : ShallowRef<T> : ShallowRef<T>;+export declare function shallowRef<T = any>(): ShallowRef<T | undefined>;+/**+ * Force trigger effects that depends on a shallow ref. This is typically used+ * after making deep mutations to the inner value of a shallow ref.+ *+ * @example+ * ```js+ * const shallow = shallowRef({+ *   greet: 'Hello, world'+ * })+ *+ * // Logs "Hello, world" once for the first run-through+ * watchEffect(() => {+ *   console.log(shallow.value.greet)+ * })+ *+ * // This won't trigger the effect because the ref is shallow+ * shallow.value.greet = 'Hello, universe'+ *+ * // Logs "Hello, universe"+ * triggerRef(shallow)+ * ```+ *+ * @param ref - The ref whose tied effects shall be executed.+ * @see {@link https://vuejs.org/api/reactivity-advanced.html#triggerref}+ */+export declare function triggerRef(ref: Ref): void;+export type MaybeRef<T = any> = T | Ref<T> | ShallowRef<T> | WritableComputedRef<T>;+export type MaybeRefOrGetter<T = any> = MaybeRef<T> | ComputedRef<T> | (() => T);+/**+ * Returns the inner value if the argument is a ref, otherwise return the+ * argument itself. This is a sugar function for+ * `val = isRef(val) ? val.value : val`.+ *+ * @example+ * ```js+ * function useFoo(x: number | Ref<number>) {+ *   const unwrapped = unref(x)+ *   // unwrapped is guaranteed to be number now+ * }+ * ```+ *+ * @param ref - Ref or plain value to be converted into the plain value.+ * @see {@link https://vuejs.org/api/reactivity-utilities.html#unref}+ */+export declare function unref<T>(ref: MaybeRef<T> | ComputedRef<T>): T;+/**+ * Normalizes values / refs / getters to values.+ * This is similar to {@link unref}, except that it also normalizes getters.+ * If the argument is a getter, it will be invoked and its return value will+ * be returned.+ *+ * @example+ * ```js+ * toValue(1) // 1+ * toValue(ref(1)) // 1+ * toValue(() => 1) // 1+ * ```+ *+ * @param source - A getter, an existing ref, or a non-function value.+ * @see {@link https://vuejs.org/api/reactivity-utilities.html#tovalue}+ */+export declare function toValue<T>(source: MaybeRefOrGetter<T>): T;+/**+ * Returns a proxy for the given object that shallowly unwraps properties that+ * are refs. If the object already is reactive, it's returned as-is. If not, a+ * new reactive proxy is created.+ *+ * @param objectWithRefs - Either an already-reactive object or a simple object+ * that contains refs.+ */+export declare function proxyRefs<T extends object>(objectWithRefs: T): ShallowUnwrapRef<T>;+export type CustomRefFactory<T, S = T> = (track: () => void, trigger: () => void) => {+    get: () => T;+    set: (value: S) => void;+};+/**+ * Creates a customized ref with explicit control over its dependency tracking+ * and updates triggering.+ *+ * @param factory - The function that receives the `track` and `trigger` callbacks.+ * @see {@link https://vuejs.org/api/reactivity-advanced.html#customref}+ */+export declare function customRef<T, S = T>(factory: CustomRefFactory<T, S>): Ref<T, S>;+export type ToRefs<T = any> = {+    [K in keyof T]: ToRef<T[K]>;+};+type ArrayStringKey<T> = T extends readonly any[] ? number extends T['length'] ? `${number}` : never : never;+type ToRefKey<T> = keyof T | ArrayStringKey<T>;+type ToRefValue<T extends object, K extends ToRefKey<T>> = K extends keyof T ? T[K] : T extends readonly (infer V)[] ? K extends ArrayStringKey<T> ? V : never : never;+/**+ * Converts a reactive object to a plain object where each property of the+ * resulting object is a ref pointing to the corresponding property of the+ * original object. Each individual ref is created using {@link toRef}.+ *+ * @param object - Reactive object to be made into an object of linked refs.+ * @see {@link https://vuejs.org/api/reactivity-utilities.html#torefs}+ */+export declare function toRefs<T extends object>(object: T): ToRefs<T>;+export type ToRef<T> = IfAny<T, Ref<T>, [T] extends [Ref] ? T : Ref<T>>;+/**+ * Used to normalize values / refs / getters into refs.+ *+ * @example+ * ```js+ * // returns existing refs as-is+ * toRef(existingRef)+ *+ * // creates a ref that calls the getter on .value access+ * toRef(() => props.foo)+ *+ * // creates normal refs from non-function values+ * // equivalent to ref(1)+ * toRef(1)+ * ```+ *+ * Can also be used to create a ref for a property on a source reactive object.+ * The created ref is synced with its source property: mutating the source+ * property will update the ref, and vice-versa.+ *+ * @example+ * ```js+ * const state = reactive({+ *   foo: 1,+ *   bar: 2+ * })+ *+ * const fooRef = toRef(state, 'foo')+ *+ * // mutating the ref updates the original+ * fooRef.value+++ * console.log(state.foo) // 2+ *+ * // mutating the original also updates the ref+ * state.foo+++ * console.log(fooRef.value) // 3+ * ```+ *+ * @param source - A getter, an existing ref, a non-function value, or a+ *                 reactive object to create a property ref from.+ * @param [key] - (optional) Name of the property in the reactive object.+ * @see {@link https://vuejs.org/api/reactivity-utilities.html#toref}+ */+export declare function toRef<T>(value: T): T extends () => infer R ? Readonly<Ref<R>> : T extends Ref ? T : Ref<UnwrapRef<T>>;+export declare function toRef<T extends object, K extends ToRefKey<T>>(object: T, key: K): ToRef<ToRefValue<T, K>>;+export declare function toRef<T extends object, K extends ToRefKey<T>>(object: T, key: K, defaultValue: ToRefValue<T, K>): ToRef<Exclude<ToRefValue<T, K>, undefined>>;+/**+ * This is a special exported interface for other packages to declare+ * additional types that should bail out for ref unwrapping. For example+ * \@vue/runtime-dom can declare it like so in its d.ts:+ *+ * ``` ts+ * declare module '@vue/reactivity' {+ *   export interface RefUnwrapBailTypes {+ *     runtimeDOMBailTypes: Node | Window+ *   }+ * }+ * ```+ */+export interface RefUnwrapBailTypes {+}+export type ShallowUnwrapRef<T> = T extends ShallowReactiveBrand ? T : {+    [K in keyof T]: DistributeRef<T[K]>;+};+type DistributeRef<T> = T extends Ref<infer V, unknown> ? V : T;+export type UnwrapRef<T> = T extends ShallowRef<infer V, unknown> ? V : T extends Ref<infer V, unknown> ? UnwrapRefSimple<V> : UnwrapRefSimple<T>;+export type UnwrapRefSimple<T> = T extends Builtin | Ref | RefUnwrapBailTypes[keyof RefUnwrapBailTypes] | {+    [RawSymbol]?: true;+} ? T : T extends ShallowReactiveBrand ? T : T extends Map<infer K, infer V> ? Map<K, UnwrapRefSimple<V>> & UnwrapRef<Omit<T, keyof Map<any, any>>> : T extends WeakMap<infer K, infer V> ? WeakMap<K, UnwrapRefSimple<V>> & UnwrapRef<Omit<T, keyof WeakMap<any, any>>> : T extends Set<infer V> ? Set<UnwrapRefSimple<V>> & UnwrapRef<Omit<T, keyof Set<any>>> : T extends WeakSet<infer V> ? WeakSet<UnwrapRefSimple<V>> & UnwrapRef<Omit<T, keyof WeakSet<any>>> : T extends ReadonlyArray<any> ? {+    [K in keyof T]: UnwrapRefSimple<T[K]>;+} : T extends object ? {+    [P in keyof T]: P extends symbol ? T[P] : UnwrapRef<T[P]>;+} : T;+export {};packages/reactivity/src/warning.d.tsnew file mode 100644index 000000000..235eb583c@@ -0,0 +1 @@+export declare function warn(msg: string, ...args: any[]): void;packages/reactivity/src/watch.d.tsnew file mode 100644index 000000000..9d84bcbdb@@ -0,0 +1,52 @@+import type { ComputedRef } from './computed';+import { type DebuggerOptions, ReactiveEffect } from './effect';+import { type Ref } from './ref';+export declare enum WatchErrorCodes {+    WATCH_GETTER = 2,+    WATCH_CALLBACK = 3,+    WATCH_CLEANUP = 4+}+export type WatchEffect = (onCleanup: OnCleanup) => void;+export type WatchSource<T = any> = Ref<T, any> | ComputedRef<T> | (() => T);+export type WatchCallback<V = any, OV = any> = (value: V, oldValue: OV, onCleanup: OnCleanup) => any;+export type OnCleanup = (cleanupFn: () => void) => void;+export interface WatchOptions<Immediate = boolean> extends DebuggerOptions {+    immediate?: Immediate;+    deep?: boolean | number;+    once?: boolean;+    scheduler?: WatchScheduler;+    onWarn?: (msg: string, ...args: any[]) => void;+    /**+     * @internal+     */+    augmentJob?: (job: (...args: any[]) => void) => void;+    /**+     * @internal+     */+    call?: (fn: Function | Function[], type: WatchErrorCodes, args?: unknown[]) => void;+}+export type WatchStopHandle = () => void;+export interface WatchHandle extends WatchStopHandle {+    pause: () => void;+    resume: () => void;+    stop: () => void;+}+export type WatchScheduler = (job: () => void, isFirstRun: boolean) => void;+/**+ * Returns the current active effect if there is one.+ */+export declare function getCurrentWatcher(): ReactiveEffect<any> | undefined;+/**+ * Registers a cleanup callback on the current active effect. This+ * registered cleanup callback will be invoked right before the+ * associated effect re-runs.+ *+ * @param cleanupFn - The callback function to attach to the effect's cleanup.+ * @param failSilently - if `true`, will not throw warning when called without+ * an active effect.+ * @param owner - The effect that this cleanup function should be attached to.+ * By default, the current active effect.+ */+export declare function onWatcherCleanup(cleanupFn: () => void, failSilently?: boolean, owner?: ReactiveEffect | undefined): void;+export declare function watch(source: WatchSource | WatchSource[] | WatchEffect | object, cb?: WatchCallback | null, options?: WatchOptions): WatchHandle;+export declare function traverse(value: unknown, depth?: number, seen?: Map<unknown, number>): unknown;packages/runtime-core/src/apiAsyncComponent.d.tsnew file mode 100644index 000000000..5c6824def@@ -0,0 +1,22 @@+import { type Component, type ComponentInternalInstance } from './component';+import type { ComponentPublicInstance } from './componentPublicInstance';+import { type VNode } from './vnode';+import { type HydrationStrategy } from './hydrationStrategies';+export type AsyncComponentResolveResult<T = Component> = T | {+    default: T;+};+export type AsyncComponentLoader<T = any> = () => Promise<AsyncComponentResolveResult<T>>;+export interface AsyncComponentOptions<T = any> {+    loader: AsyncComponentLoader<T>;+    loadingComponent?: Component;+    errorComponent?: Component;+    delay?: number;+    timeout?: number;+    suspensible?: boolean;+    hydrate?: HydrationStrategy;+    onError?: (error: Error, retry: () => void, fail: () => void, attempts: number) => any;+}+export declare const isAsyncWrapper: (i: ComponentInternalInstance | VNode) => boolean;+export declare function defineAsyncComponent<T extends Component = {+    new (): ComponentPublicInstance;+}>(source: AsyncComponentLoader<T> | AsyncComponentOptions<T>): T;packages/runtime-core/src/apiComputed.d.tsnew file mode 100644index 000000000..dee7fdf55@@ -0,0 +1,2 @@+import { computed as _computed } from '@vue/reactivity';+export declare const computed: typeof _computed;packages/runtime-core/src/apiCreateApp.d.tsnew file mode 100644index 000000000..081d29166@@ -0,0 +1,147 @@+import { type Component, type ComponentInternalInstance, type ConcreteComponent, type Data } from './component';+import type { ComponentOptions, MergedComponentOptions, RuntimeCompilerOptions } from './componentOptions';+import type { ComponentCustomProperties, ComponentPublicInstance } from './componentPublicInstance';+import { type Directive } from './directives';+import type { ElementNamespace, RootRenderFunction } from './renderer';+import type { InjectionKey } from './apiInject';+import { type VNode } from './vnode';+import type { RootHydrateFunction } from './hydration';+import type { NormalizedPropsOptions } from './componentProps';+import type { ObjectEmitsOptions } from './componentEmits';+import type { DefineComponent } from './apiDefineComponent';+export interface App<HostElement = any> {+    version: string;+    config: AppConfig;+    use<Options extends unknown[]>(plugin: Plugin<Options>, ...options: NoInfer<Options>): this;+    use<Options>(plugin: Plugin<Options>, options: NoInfer<Options>): this;+    mixin(mixin: ComponentOptions): this;+    component(name: string): Component | undefined;+    component<T extends Component | DefineComponent>(name: string, component: T): this;+    directive<HostElement = any, Value = any, Modifiers extends string = string, Arg = any>(name: string): Directive<HostElement, Value, Modifiers, Arg> | undefined;+    directive<HostElement = any, Value = any, Modifiers extends string = string, Arg = any>(name: string, directive: Directive<HostElement, Value, Modifiers, Arg>): this;+    mount(rootContainer: HostElement | string, +    /**+     * @internal+     */+    isHydrate?: boolean, +    /**+     * @internal+     */+    namespace?: boolean | ElementNamespace, +    /**+     * @internal+     */+    vnode?: VNode): ComponentPublicInstance;+    unmount(): void;+    onUnmount(cb: () => void): void;+    provide<T, K = InjectionKey<T> | string | number>(key: K, value: K extends InjectionKey<infer V> ? V : T): this;+    /**+     * Runs a function with the app as active instance. This allows using of `inject()` within the function to get access+     * to variables provided via `app.provide()`.+     *+     * @param fn - function to run with the app as active instance+     */+    runWithContext<T>(fn: () => T): T;+    _uid: number;+    _component: ConcreteComponent;+    _props: Data | null;+    _container: HostElement | null;+    _context: AppContext;+    _instance: ComponentInternalInstance | null;+    /**+     * @internal custom element vnode+     */+    _ceVNode?: VNode;+    /**+     * v2 compat only+     */+    filter?(name: string): Function | undefined;+    filter?(name: string, filter: Function): this;+    /**+     * @internal v3 compat only+     */+    _createRoot?(options: ComponentOptions): ComponentPublicInstance;+}+export type OptionMergeFunction = (to: unknown, from: unknown) => any;+export interface AppConfig {+    readonly isNativeTag: (tag: string) => boolean;+    performance: boolean;+    optionMergeStrategies: Record<string, OptionMergeFunction>;+    globalProperties: ComponentCustomProperties & Record<string, any>;+    errorHandler?: (err: unknown, instance: ComponentPublicInstance | null, info: string) => void;+    warnHandler?: (msg: string, instance: ComponentPublicInstance | null, trace: string) => void;+    /**+     * Options to pass to `@vue/compiler-dom`.+     * Only supported in runtime compiler build.+     */+    compilerOptions: RuntimeCompilerOptions;+    /**+     * @deprecated use config.compilerOptions.isCustomElement+     */+    isCustomElement?: (tag: string) => boolean;+    /**+     * TODO document for 3.5+     * Enable warnings for computed getters that recursively trigger itself.+     */+    warnRecursiveComputed?: boolean;+    /**+     * Whether to throw unhandled errors in production.+     * Default is `false` to avoid crashing on any error (and only logs it)+     * But in some cases, e.g. SSR, throwing might be more desirable.+     */+    throwUnhandledErrorInProduction?: boolean;+    /**+     * Prefix for all useId() calls within this app+     */+    idPrefix?: string;+}+export interface AppContext {+    app: App;+    config: AppConfig;+    mixins: ComponentOptions[];+    components: Record<string, Component>;+    directives: Record<string, Directive>;+    provides: Record<string | symbol, any>;+    /**+     * Cache for merged/normalized component options+     * Each app instance has its own cache because app-level global mixins and+     * optionMergeStrategies can affect merge behavior.+     * @internal+     */+    optionsCache: WeakMap<ComponentOptions, MergedComponentOptions>;+    /**+     * Cache for normalized props options+     * @internal+     */+    propsCache: WeakMap<ConcreteComponent, NormalizedPropsOptions>;+    /**+     * Cache for normalized emits options+     * @internal+     */+    emitsCache: WeakMap<ConcreteComponent, ObjectEmitsOptions | null>;+    /**+     * HMR only+     * @internal+     */+    reload?: () => void;+    /**+     * v2 compat only+     * @internal+     */+    filters?: Record<string, Function>;+}+type PluginInstallFunction<Options = any[]> = Options extends unknown[] ? (app: App, ...options: Options) => any : (app: App, options: Options) => any;+export type ObjectPlugin<Options = any[]> = {+    install: PluginInstallFunction<Options>;+};+export type FunctionPlugin<Options = any[]> = PluginInstallFunction<Options> & Partial<ObjectPlugin<Options>>;+export type Plugin<Options = any[], P extends unknown[] = Options extends unknown[] ? Options : [Options]> = FunctionPlugin<P> | ObjectPlugin<P>;+export declare function createAppContext(): AppContext;+export type CreateAppFunction<HostElement> = (rootComponent: Component, rootProps?: Data | null) => App<HostElement>;+export declare function createAppAPI<HostElement>(render: RootRenderFunction<HostElement>, hydrate?: RootHydrateFunction): CreateAppFunction<HostElement>;+/**+ * @internal Used to identify the current app when using `inject()` within+ * `app.runWithContext()`.+ */+export declare let currentApp: App<unknown> | null;+export {};packages/runtime-core/src/apiDefineComponent.d.tsnew file mode 100644index 000000000..f3abf518e@@ -0,0 +1,48 @@+import type { ComponentInjectOptions, ComponentOptions, ComponentOptionsBase, ComponentOptionsMixin, ComponentProvideOptions, ComputedOptions, MethodOptions, RenderFunction } from './componentOptions';+import type { AllowedComponentProps, Component, ComponentCustomProps, GlobalComponents, GlobalDirectives, SetupContext } from './component';+import type { ComponentObjectPropsOptions, ComponentPropsOptions, ExtractDefaultPropTypes, ExtractPropTypes } from './componentProps';+import type { EmitsOptions, EmitsToProps, TypeEmitsToOptions } from './componentEmits';+import { type IsKeyValues } from '@vue/shared';+import type { VNodeProps } from './vnode';+import type { ComponentPublicInstanceConstructor, CreateComponentPublicInstanceWithMixins } from './componentPublicInstance';+import type { SlotsType } from './componentSlots';+import type { Directive } from './directives';+import type { ComponentTypeEmits } from './apiSetupHelpers';+export type PublicProps = VNodeProps & AllowedComponentProps & ComponentCustomProps;+type ResolveProps<PropsOrPropOptions, E extends EmitsOptions> = Readonly<PropsOrPropOptions extends ComponentPropsOptions ? ExtractPropTypes<PropsOrPropOptions> : PropsOrPropOptions> & ({} extends E ? {} : EmitsToProps<E>);+export type DefineComponent<PropsOrPropOptions = {}, RawBindings = {}, D = {}, C extends ComputedOptions = ComputedOptions, M extends MethodOptions = MethodOptions, Mixin extends ComponentOptionsMixin = ComponentOptionsMixin, Extends extends ComponentOptionsMixin = ComponentOptionsMixin, E extends EmitsOptions = {}, EE extends string = string, PP = PublicProps, Props = ResolveProps<PropsOrPropOptions, E>, Defaults = ExtractDefaultPropTypes<PropsOrPropOptions>, S extends SlotsType = {}, LC extends Record<string, Component> = {}, Directives extends Record<string, Directive> = {}, Exposed extends string = string, Provide extends ComponentProvideOptions = ComponentProvideOptions, MakeDefaultsOptional extends boolean = true, TypeRefs extends Record<string, unknown> = {}, TypeEl = any> = ComponentPublicInstanceConstructor<CreateComponentPublicInstanceWithMixins<Props, RawBindings, D, C, M, Mixin, Extends, E, PP, Defaults, MakeDefaultsOptional, {}, S, LC & GlobalComponents, Directives & GlobalDirectives, Exposed, TypeRefs, TypeEl>> & ComponentOptionsBase<Props, RawBindings, D, C, M, Mixin, Extends, E, EE, Defaults, {}, string, S, LC & GlobalComponents, Directives & GlobalDirectives, Exposed, Provide> & PP;+export type DefineSetupFnComponent<P extends Record<string, any>, E extends EmitsOptions = {}, S extends SlotsType = SlotsType, Props = P & EmitsToProps<E>, PP = PublicProps> = new (props: Props & PP) => CreateComponentPublicInstanceWithMixins<Props, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, E, PP, {}, false, {}, S>;+type ToResolvedProps<Props, Emits extends EmitsOptions> = Readonly<Props> & Readonly<EmitsToProps<Emits>>;+export declare function defineComponent<Props extends Record<string, any>, E extends EmitsOptions = {}, EE extends string = string, S extends SlotsType = {}>(setup: (props: Props, ctx: SetupContext<E, S>) => RenderFunction | Promise<RenderFunction>, options?: Pick<ComponentOptions, 'name' | 'inheritAttrs'> & {+    props?: (keyof NoInfer<Props>)[];+    emits?: E | EE[];+    slots?: S;+}): DefineSetupFnComponent<Props, E, S>;+export declare function defineComponent<Props extends Record<string, any>, E extends EmitsOptions = {}, EE extends string = string, S extends SlotsType = {}>(setup: (props: Props, ctx: SetupContext<E, S>) => RenderFunction | Promise<RenderFunction>, options?: Pick<ComponentOptions, 'name' | 'inheritAttrs'> & {+    props?: ComponentObjectPropsOptions<Props>;+    emits?: E | EE[];+    slots?: S;+}): DefineSetupFnComponent<Props, E, S>;+export declare function defineComponent<TypeProps, RuntimePropsOptions extends ComponentObjectPropsOptions = ComponentObjectPropsOptions, RuntimePropsKeys extends string = string, TypeEmits extends ComponentTypeEmits = {}, RuntimeEmitsOptions extends EmitsOptions = {}, RuntimeEmitsKeys extends string = string, Data = {}, SetupBindings = {}, Computed extends ComputedOptions = {}, Methods extends MethodOptions = {}, Mixin extends ComponentOptionsMixin = ComponentOptionsMixin, Extends extends ComponentOptionsMixin = ComponentOptionsMixin, InjectOptions extends ComponentInjectOptions = {}, InjectKeys extends string = string, Slots extends SlotsType = {}, LocalComponents extends Record<string, Component> = {}, Directives extends Record<string, Directive> = {}, Exposed extends string = string, Provide extends ComponentProvideOptions = ComponentProvideOptions, ResolvedEmits extends EmitsOptions = {} extends RuntimeEmitsOptions ? TypeEmitsToOptions<TypeEmits> : RuntimeEmitsOptions, InferredProps = IsKeyValues<TypeProps> extends true ? TypeProps : string extends RuntimePropsKeys ? ComponentObjectPropsOptions extends RuntimePropsOptions ? {} : ExtractPropTypes<RuntimePropsOptions> : {+    [key in RuntimePropsKeys]?: any;+}, TypeRefs extends Record<string, unknown> = {}, TypeEl = any>(options: {+    props?: (RuntimePropsOptions & ThisType<void>) | RuntimePropsKeys[];+    /**+     * @private for language-tools use only+     */+    __typeProps?: TypeProps;+    /**+     * @private for language-tools use only+     */+    __typeEmits?: TypeEmits;+    /**+     * @private for language-tools use only+     */+    __typeRefs?: TypeRefs;+    /**+     * @private for language-tools use only+     */+    __typeEl?: TypeEl;+} & ComponentOptionsBase<ToResolvedProps<InferredProps, ResolvedEmits>, SetupBindings, Data, Computed, Methods, Mixin, Extends, RuntimeEmitsOptions, RuntimeEmitsKeys, {}, // Defaults+InjectOptions, InjectKeys, Slots, LocalComponents, Directives, Exposed, Provide> & ThisType<CreateComponentPublicInstanceWithMixins<ToResolvedProps<InferredProps, ResolvedEmits>, SetupBindings, Data, Computed, Methods, Mixin, Extends, ResolvedEmits, {}, {}, false, InjectOptions, Slots, LocalComponents, Directives, string>>): DefineComponent<InferredProps, SetupBindings, Data, Computed, Methods, Mixin, Extends, ResolvedEmits, RuntimeEmitsKeys, PublicProps, ToResolvedProps<InferredProps, ResolvedEmits>, ExtractDefaultPropTypes<RuntimePropsOptions>, Slots, LocalComponents, Directives, Exposed, Provide, unknown extends TypeProps ? true : false, TypeRefs, TypeEl>;+export {};packages/runtime-core/src/apiInject.d.tsnew file mode 100644index 000000000..1509ce2aa@@ -0,0 +1,14 @@+interface InjectionConstraint<T> {+}+export type InjectionKey<T> = symbol & InjectionConstraint<T>;+export declare function provide<T, K = InjectionKey<T> | string | number>(key: K, value: K extends InjectionKey<infer V> ? V : T): void;+export declare function inject<T>(key: InjectionKey<T> | string): T | undefined;+export declare function inject<T>(key: InjectionKey<T> | string, defaultValue: T, treatDefaultAsFactory?: false): T;+export declare function inject<T>(key: InjectionKey<T> | string, defaultValue: T | (() => T), treatDefaultAsFactory: true): T;+/**+ * Returns true if `inject()` can be used without warning about being called in the wrong place (e.g. outside of+ * setup()). This is used by libraries that want to use `inject()` internally without triggering a warning to the end+ * user. One example is `useRoute()` in `vue-router`.+ */+export declare function hasInjectionContext(): boolean;+export {};packages/runtime-core/src/apiLifecycle.d.tsnew file mode 100644index 000000000..05a1729e3@@ -0,0 +1,21 @@+import { type ComponentInternalInstance } from './component';+import type { ComponentPublicInstance } from './componentPublicInstance';+import { type DebuggerEvent } from '@vue/reactivity';+import { LifecycleHooks } from './enums';+export { onActivated, onDeactivated } from './components/KeepAlive';+export declare function injectHook(type: LifecycleHooks, hook: Function & {+    __weh?: Function;+}, target?: ComponentInternalInstance | null, prepend?: boolean): Function | undefined;+type CreateHook<T = any> = (hook: T, target?: ComponentInternalInstance | null) => void;+export declare const onBeforeMount: CreateHook;+export declare const onMounted: CreateHook;+export declare const onBeforeUpdate: CreateHook;+export declare const onUpdated: CreateHook;+export declare const onBeforeUnmount: CreateHook;+export declare const onUnmounted: CreateHook;+export declare const onServerPrefetch: CreateHook;+export type DebuggerHook = (e: DebuggerEvent) => void;+export declare const onRenderTriggered: CreateHook<DebuggerHook>;+export declare const onRenderTracked: CreateHook<DebuggerHook>;+export type ErrorCapturedHook<TError = unknown> = (err: TError, instance: ComponentPublicInstance | null, info: string) => boolean | void;+export declare function onErrorCaptured<TError = Error>(hook: ErrorCapturedHook<TError>, target?: ComponentInternalInstance | null): void;packages/runtime-core/src/apiSetupHelpers.d.tsnew file mode 100644index 000000000..bf4b3c36b@@ -0,0 +1,279 @@+import { type IfAny, type LooseRequired, type Prettify, type UnionToIntersection } from '@vue/shared';+import { type Data, type SetupContext } from './component';+import type { EmitFn, EmitsOptions, ObjectEmitsOptions } from './componentEmits';+import type { ComponentOptionsBase, ComponentOptionsMixin, ComputedOptions, MethodOptions } from './componentOptions';+import type { ComponentObjectPropsOptions, ComponentPropsOptions, ExtractPropTypes, PropOptions, PropType } from './componentProps';+import type { SlotsType, StrictUnwrapSlotsType } from './componentSlots';+import type { Ref } from '@vue/reactivity';+/**+ * Vue `<script setup>` compiler macro for declaring component props. The+ * expected argument is the same as the component `props` option.+ *+ * Example runtime declaration:+ * ```js+ * // using Array syntax+ * const props = defineProps(['foo', 'bar'])+ * // using Object syntax+ * const props = defineProps({+ *   foo: String,+ *   bar: {+ *     type: Number,+ *     required: true+ *   }+ * })+ * ```+ *+ * Equivalent type-based declaration:+ * ```ts+ * // will be compiled into equivalent runtime declarations+ * const props = defineProps<{+ *   foo?: string+ *   bar: number+ * }>()+ * ```+ *+ * @see {@link https://vuejs.org/api/sfc-script-setup.html#defineprops-defineemits}+ *+ * This is only usable inside `<script setup>`, is compiled away in the+ * output and should **not** be actually called at runtime.+ */+export declare function defineProps<PropNames extends string = string>(props: PropNames[]): Prettify<Readonly<{+    [key in PropNames]?: any;+}>>;+export declare function defineProps<PP extends ComponentObjectPropsOptions = ComponentObjectPropsOptions>(props: PP): Prettify<Readonly<ExtractPropTypes<PP>>>;+export declare function defineProps<TypeProps>(): DefineProps<LooseRequired<TypeProps>, BooleanKey<TypeProps>>;+export type DefineProps<T, BKeys extends keyof T> = Readonly<T> & {+    readonly [K in BKeys]-?: boolean;+};+type BooleanKey<T, K extends keyof T = keyof T> = K extends any ? T[K] extends boolean | undefined ? T[K] extends never | undefined ? never : K : never : never;+/**+ * Vue `<script setup>` compiler macro for declaring a component's emitted+ * events. The expected argument is the same as the component `emits` option.+ *+ * Example runtime declaration:+ * ```js+ * const emit = defineEmits(['change', 'update'])+ * ```+ *+ * Example type-based declaration:+ * ```ts+ * const emit = defineEmits<{+ *   // <eventName>: <expected arguments>+ *   change: []+ *   update: [value: number] // named tuple syntax+ * }>()+ *+ * emit('change')+ * emit('update', 1)+ * ```+ *+ * This is only usable inside `<script setup>`, is compiled away in the+ * output and should **not** be actually called at runtime.+ *+ * @see {@link https://vuejs.org/api/sfc-script-setup.html#defineprops-defineemits}+ */+export declare function defineEmits<EE extends string = string>(emitOptions: EE[]): EmitFn<EE[]>;+export declare function defineEmits<E extends EmitsOptions = EmitsOptions>(emitOptions: E): EmitFn<E>;+export declare function defineEmits<T extends ComponentTypeEmits>(): T extends (...args: any[]) => any ? T : ShortEmits<T>;+export type ComponentTypeEmits = ((...args: any[]) => any) | Record<string, any>;+type RecordToUnion<T extends Record<string, any>> = T[keyof T];+type ShortEmits<T extends Record<string, any>> = UnionToIntersection<RecordToUnion<{+    [K in keyof T]: (evt: K, ...args: T[K]) => void;+}>>;+/**+ * Vue `<script setup>` compiler macro for declaring a component's exposed+ * instance properties when it is accessed by a parent component via template+ * refs.+ *+ * `<script setup>` components are closed by default - i.e. variables inside+ * the `<script setup>` scope is not exposed to parent unless explicitly exposed+ * via `defineExpose`.+ *+ * This is only usable inside `<script setup>`, is compiled away in the+ * output and should **not** be actually called at runtime.+ *+ * @see {@link https://vuejs.org/api/sfc-script-setup.html#defineexpose}+ */+export declare function defineExpose<Exposed extends Record<string, any> = Record<string, any>>(exposed?: Exposed): void;+/**+ * Vue `<script setup>` compiler macro for declaring a component's additional+ * options. This should be used only for options that cannot be expressed via+ * Composition API - e.g. `inheritAttrs`.+ *+ * @see {@link https://vuejs.org/api/sfc-script-setup.html#defineoptions}+ */+export declare function defineOptions<RawBindings = {}, D = {}, C extends ComputedOptions = {}, M extends MethodOptions = {}, Mixin extends ComponentOptionsMixin = ComponentOptionsMixin, Extends extends ComponentOptionsMixin = ComponentOptionsMixin>(options?: ComponentOptionsBase<{}, RawBindings, D, C, M, Mixin, Extends, {}> & {+    /**+     * props should be defined via defineProps().+     */+    props?: never;+    /**+     * emits should be defined via defineEmits().+     */+    emits?: never;+    /**+     * expose should be defined via defineExpose().+     */+    expose?: never;+    /**+     * slots should be defined via defineSlots().+     */+    slots?: never;+}): void;+/**+ * Vue `<script setup>` compiler macro for providing type hints to IDEs for+ * slot name and slot props type checking.+ *+ * Example usage:+ * ```ts+ * const slots = defineSlots<{+ *   default(props: { msg: string }): any+ * }>()+ * ```+ *+ * This is only usable inside `<script setup>`, is compiled away in the+ * output and should **not** be actually called at runtime.+ *+ * @see {@link https://vuejs.org/api/sfc-script-setup.html#defineslots}+ */+export declare function defineSlots<S extends Record<string, any> = Record<string, any>>(): StrictUnwrapSlotsType<SlotsType<S>>;+export type ModelRef<T, M extends PropertyKey = string, G = T, S = T> = Ref<G, S> & [+    ModelRef<T, M, G, S>,+    Record<M, true | undefined>+];+export type DefineModelOptions<T = any, G = T, S = T> = {+    get?: (v: T) => G;+    set?: (v: S) => any;+};+type DefineModelRuntimeOptions<T, G, S> = Omit<PropOptions<T>, 'default'> & DefineModelOptions<T, G, S>;+type DefineModelDefault<T> = InferDefault<Data, T>;+type DefineModelTypedDefault<T> = {+    type: PropType<T>;+    default: DefineModelDefault<NoInfer<T>>;+};+/**+ * Vue `<script setup>` compiler macro for declaring a+ * two-way binding prop that can be consumed via `v-model` from the parent+ * component. This will declare a prop with the same name and a corresponding+ * `update:propName` event.+ *+ * If the first argument is a string, it will be used as the prop name;+ * Otherwise the prop name will default to "modelValue". In both cases, you+ * can also pass an additional object which will be used as the prop's options.+ *+ * The returned ref behaves differently depending on whether the parent+ * provided the corresponding v-model props or not:+ * - If yes, the returned ref's value will always be in sync with the parent+ *   prop.+ * - If not, the returned ref will behave like a normal local ref.+ *+ * @example+ * ```ts+ * // default model (consumed via `v-model`)+ * const modelValue = defineModel<string>()+ * modelValue.value = "hello"+ *+ * // default model with options+ * const modelValue = defineModel<string>({ required: true })+ *+ * // with specified name (consumed via `v-model:count`)+ * const count = defineModel<number>('count')+ * count.value+++ *+ * // with specified name and default value+ * const count = defineModel<number>('count', { default: 0 })+ * ```+ */+export declare function defineModel<T, M extends PropertyKey = string, G = T, S = T>(options: DefineModelTypedDefault<T> & DefineModelRuntimeOptions<T, G, S>): ModelRef<T, M, G, S>;+export declare function defineModel<T, M extends PropertyKey = string, G = T, S = T>(options: ({+    default: DefineModelDefault<T>;+} | {+    required: true;+}) & DefineModelRuntimeOptions<T, G, S>): ModelRef<T, M, G, S>;+export declare function defineModel<T, M extends PropertyKey = string, G = T, S = T>(options?: DefineModelRuntimeOptions<T, G, S>): ModelRef<T | undefined, M, G | undefined, S | undefined>;+export declare function defineModel<T, M extends PropertyKey = string, G = T, S = T>(name: string, options: DefineModelTypedDefault<T> & DefineModelRuntimeOptions<T, G, S>): ModelRef<T, M, G, S>;+export declare function defineModel<T, M extends PropertyKey = string, G = T, S = T>(name: string, options: ({+    default: DefineModelDefault<T>;+} | {+    required: true;+}) & DefineModelRuntimeOptions<T, G, S>): ModelRef<T, M, G, S>;+export declare function defineModel<T, M extends PropertyKey = string, G = T, S = T>(name: string, options?: DefineModelRuntimeOptions<T, G, S>): ModelRef<T | undefined, M, G | undefined, S | undefined>;+type NotUndefined<T> = T extends undefined ? never : T;+type MappedOmit<T, K extends keyof any> = {+    [P in keyof T as P extends K ? never : P]: T[P];+};+type InferDefaults<T> = {+    [K in keyof T]?: InferDefault<T, T[K]>;+};+type NativeType = null | undefined | number | string | boolean | symbol | Function;+type InferDefault<P, T> = ((props: P) => T & {}) | (T extends NativeType ? T : never);+type PropsWithDefaults<T, Defaults extends InferDefaults<T>, BKeys extends keyof T> = T extends unknown ? Readonly<MappedOmit<T, keyof Defaults>> & {+    readonly [K in keyof Defaults as K extends keyof T ? K : never]-?: K extends keyof T ? Defaults[K] extends undefined ? IfAny<Defaults[K], NotUndefined<T[K]>, T[K]> : NotUndefined<T[K]> : never;+} & {+    readonly [K in BKeys]-?: K extends keyof Defaults ? Defaults[K] extends undefined ? boolean | undefined : boolean : boolean;+} : never;+/**+ * Vue `<script setup>` compiler macro for providing props default values when+ * using type-based `defineProps` declaration.+ *+ * Example usage:+ * ```ts+ * withDefaults(defineProps<{+ *   size?: number+ *   labels?: string[]+ * }>(), {+ *   size: 3,+ *   labels: () => ['default label']+ * })+ * ```+ *+ * This is only usable inside `<script setup>`, is compiled away in the output+ * and should **not** be actually called at runtime.+ *+ * @see {@link https://vuejs.org/guide/typescript/composition-api.html#typing-component-props}+ */+export declare function withDefaults<T, BKeys extends keyof T, Defaults extends InferDefaults<T>>(props: DefineProps<T, BKeys>, defaults: Defaults): PropsWithDefaults<T, Defaults, BKeys>;+export declare function useSlots(): SetupContext['slots'];+export declare function useAttrs(): SetupContext['attrs'];+/**+ * @internal+ */+export declare function normalizePropsOrEmits(props: ComponentPropsOptions | EmitsOptions): ComponentObjectPropsOptions | ObjectEmitsOptions;+/**+ * Runtime helper for merging default declarations. Imported by compiled code+ * only.+ * @internal+ */+export declare function mergeDefaults(raw: ComponentPropsOptions, defaults: Record<string, any>): ComponentObjectPropsOptions;+/**+ * Runtime helper for merging model declarations.+ * Imported by compiled code only.+ * @internal+ */+export declare function mergeModels(a: ComponentPropsOptions | EmitsOptions, b: ComponentPropsOptions | EmitsOptions): ComponentPropsOptions | EmitsOptions;+/**+ * Used to create a proxy for the rest element when destructuring props with+ * defineProps().+ * @internal+ */+export declare function createPropsRestProxy(props: any, excludedKeys: string[]): Record<string, any>;+/**+ * `<script setup>` helper for persisting the current instance context over+ * async/await flows.+ *+ * `@vue/compiler-sfc` converts the following:+ *+ * ```ts+ * const x = await foo()+ * ```+ *+ * into:+ *+ * ```ts+ * let __temp, __restore+ * const x = (([__temp, __restore] = withAsyncContext(() => foo())),__temp=await __temp,__restore(),__temp)+ * ```+ * @internal+ */+export declare function withAsyncContext(getAwaitable: () => any): [any, () => void];+export {};packages/runtime-core/src/apiSetupHelpers.tsindex 7a1d2e3a2..ad9daae5f 100644@@ -30,6 +30,7 @@ import type {   ComponentPropsOptions,   ExtractPropTypes,   PropOptions,+  PropType, } from './componentProps' import { warn } from './warning' import type { SlotsType, StrictUnwrapSlotsType } from './componentSlots'@@ -275,6 +276,14 @@ type DefineModelRuntimeOptions<T, G, S> = Omit<PropOptions<T>, 'default'> &  type DefineModelDefault<T> = InferDefault<Data, T> +// when a runtime `type` is declared, infer `T` from it only and validate+// `default` against it - otherwise a factory default (e.g. `() => []`) would+// itself become an inference candidate for `T`.+type DefineModelTypedDefault<T> = {+  type: PropType<T>+  default: DefineModelDefault<NoInfer<T>>+}+ /**  * Vue `<script setup>` compiler macro for declaring a  * two-way binding prop that can be consumed via `v-model` from the parent@@ -308,6 +317,10 @@ type DefineModelDefault<T> = InferDefault<Data, T>  * const count = defineModel<number>('count', { default: 0 })  * ```  */+export function defineModel<T, M extends PropertyKey = string, G = T, S = T>(+  options: DefineModelTypedDefault<T> & DefineModelRuntimeOptions<T, G, S>,+): ModelRef<T, M, G, S>+ export function defineModel<T, M extends PropertyKey = string, G = T, S = T>(   options: ({ default: DefineModelDefault<T> } | { required: true }) &     DefineModelRuntimeOptions<T, G, S>,@@ -317,6 +330,11 @@ export function defineModel<T, M extends PropertyKey = string, G = T, S = T>(   options?: DefineModelRuntimeOptions<T, G, S>, ): ModelRef<T | undefined, M, G | undefined, S | undefined> +export function defineModel<T, M extends PropertyKey = string, G = T, S = T>(+  name: string,+  options: DefineModelTypedDefault<T> & DefineModelRuntimeOptions<T, G, S>,+): ModelRef<T, M, G, S>+ export function defineModel<T, M extends PropertyKey = string, G = T, S = T>(   name: string,   options: ({ default: DefineModelDefault<T> } | { required: true }) &packages/runtime-core/src/apiWatch.d.tsnew file mode 100644index 000000000..4225e2fad@@ -0,0 +1,27 @@+import { type DebuggerOptions, type ReactiveMarker, type WatchCallback, type WatchEffect, type WatchHandle, type WatchSource } from '@vue/reactivity';+import { type ComponentInternalInstance } from './component';+import type { ObjectWatchOptionItem } from './componentOptions';+import type { ComponentPublicInstance } from './componentPublicInstance';+export type { WatchHandle, WatchStopHandle, WatchEffect, WatchSource, WatchCallback, OnCleanup, } from '@vue/reactivity';+type MaybeUndefined<T, I> = I extends true ? T | undefined : T;+type MapSources<T, Immediate> = {+    [K in keyof T]: T[K] extends WatchSource<infer V> ? MaybeUndefined<V, Immediate> : T[K] extends object ? MaybeUndefined<T[K], Immediate> : never;+};+export interface WatchEffectOptions extends DebuggerOptions {+    flush?: 'pre' | 'post' | 'sync';+}+export interface WatchOptions<Immediate = boolean> extends WatchEffectOptions {+    immediate?: Immediate;+    deep?: boolean | number;+    once?: boolean;+}+export declare function watchEffect(effect: WatchEffect, options?: WatchEffectOptions): WatchHandle;+export declare function watchPostEffect(effect: WatchEffect, options?: DebuggerOptions): WatchHandle;+export declare function watchSyncEffect(effect: WatchEffect, options?: DebuggerOptions): WatchHandle;+export type MultiWatchSources = (WatchSource<unknown> | object)[];+export declare function watch<T, Immediate extends Readonly<boolean> = false>(source: WatchSource<T>, cb: WatchCallback<T, MaybeUndefined<T, Immediate>>, options?: WatchOptions<Immediate>): WatchHandle;+export declare function watch<T extends Readonly<MultiWatchSources>, Immediate extends Readonly<boolean> = false>(sources: readonly [...T] | T, cb: [T] extends [ReactiveMarker] ? WatchCallback<T, MaybeUndefined<T, Immediate>> : WatchCallback<MapSources<T, false>, MapSources<T, Immediate>>, options?: WatchOptions<Immediate>): WatchHandle;+export declare function watch<T extends MultiWatchSources, Immediate extends Readonly<boolean> = false>(sources: [...T], cb: WatchCallback<MapSources<T, false>, MapSources<T, Immediate>>, options?: WatchOptions<Immediate>): WatchHandle;+export declare function watch<T extends object, Immediate extends Readonly<boolean> = false>(source: T, cb: WatchCallback<T, MaybeUndefined<T, Immediate>>, options?: WatchOptions<Immediate>): WatchHandle;+export declare function instanceWatch(this: ComponentInternalInstance, source: string | Function, value: WatchCallback | ObjectWatchOptionItem, options?: WatchOptions): WatchHandle;+export declare function createPathGetter(ctx: ComponentPublicInstance, path: string): () => WatchSource | WatchSource[] | WatchEffect | object;packages/runtime-core/src/compat/attrsFallthrough.d.tsnew file mode 100644index 000000000..ea007e9c4@@ -0,0 +1,2 @@+import type { ComponentInternalInstance } from '../component';+export declare function shouldSkipAttr(key: string, instance: ComponentInternalInstance): boolean;packages/runtime-core/src/compat/compatConfig.d.tsnew file mode 100644index 000000000..1d12b5512@@ -0,0 +1,76 @@+import { type Component, type ComponentInternalInstance } from '../component';+export declare enum DeprecationTypes {+    GLOBAL_MOUNT = "GLOBAL_MOUNT",+    GLOBAL_MOUNT_CONTAINER = "GLOBAL_MOUNT_CONTAINER",+    GLOBAL_EXTEND = "GLOBAL_EXTEND",+    GLOBAL_PROTOTYPE = "GLOBAL_PROTOTYPE",+    GLOBAL_SET = "GLOBAL_SET",+    GLOBAL_DELETE = "GLOBAL_DELETE",+    GLOBAL_OBSERVABLE = "GLOBAL_OBSERVABLE",+    GLOBAL_PRIVATE_UTIL = "GLOBAL_PRIVATE_UTIL",+    CONFIG_SILENT = "CONFIG_SILENT",+    CONFIG_DEVTOOLS = "CONFIG_DEVTOOLS",+    CONFIG_KEY_CODES = "CONFIG_KEY_CODES",+    CONFIG_PRODUCTION_TIP = "CONFIG_PRODUCTION_TIP",+    CONFIG_IGNORED_ELEMENTS = "CONFIG_IGNORED_ELEMENTS",+    CONFIG_WHITESPACE = "CONFIG_WHITESPACE",+    CONFIG_OPTION_MERGE_STRATS = "CONFIG_OPTION_MERGE_STRATS",+    INSTANCE_SET = "INSTANCE_SET",+    INSTANCE_DELETE = "INSTANCE_DELETE",+    INSTANCE_DESTROY = "INSTANCE_DESTROY",+    INSTANCE_EVENT_EMITTER = "INSTANCE_EVENT_EMITTER",+    INSTANCE_EVENT_HOOKS = "INSTANCE_EVENT_HOOKS",+    INSTANCE_CHILDREN = "INSTANCE_CHILDREN",+    INSTANCE_LISTENERS = "INSTANCE_LISTENERS",+    INSTANCE_SCOPED_SLOTS = "INSTANCE_SCOPED_SLOTS",+    INSTANCE_ATTRS_CLASS_STYLE = "INSTANCE_ATTRS_CLASS_STYLE",+    OPTIONS_DATA_FN = "OPTIONS_DATA_FN",+    OPTIONS_DATA_MERGE = "OPTIONS_DATA_MERGE",+    OPTIONS_BEFORE_DESTROY = "OPTIONS_BEFORE_DESTROY",+    OPTIONS_DESTROYED = "OPTIONS_DESTROYED",+    WATCH_ARRAY = "WATCH_ARRAY",+    PROPS_DEFAULT_THIS = "PROPS_DEFAULT_THIS",+    V_ON_KEYCODE_MODIFIER = "V_ON_KEYCODE_MODIFIER",+    CUSTOM_DIR = "CUSTOM_DIR",+    ATTR_FALSE_VALUE = "ATTR_FALSE_VALUE",+    ATTR_ENUMERATED_COERCION = "ATTR_ENUMERATED_COERCION",+    TRANSITION_CLASSES = "TRANSITION_CLASSES",+    TRANSITION_GROUP_ROOT = "TRANSITION_GROUP_ROOT",+    COMPONENT_ASYNC = "COMPONENT_ASYNC",+    COMPONENT_FUNCTIONAL = "COMPONENT_FUNCTIONAL",+    COMPONENT_V_MODEL = "COMPONENT_V_MODEL",+    RENDER_FUNCTION = "RENDER_FUNCTION",+    FILTERS = "FILTERS",+    PRIVATE_APIS = "PRIVATE_APIS"+}+type DeprecationData = {+    message: string | ((...args: any[]) => string);+    link?: string;+};+export declare const deprecationData: Record<DeprecationTypes, DeprecationData>;+export declare function toggleDeprecationWarning(flag: boolean): void;+export declare function warnDeprecation(key: DeprecationTypes, instance: ComponentInternalInstance | null, ...args: any[]): void;+export type CompatConfig = Partial<Record<DeprecationTypes, boolean | 'suppress-warning'>> & {+    MODE?: 2 | 3 | ((comp: Component | null) => 2 | 3);+};+export declare const globalCompatConfig: CompatConfig;+export declare function configureCompat(config: CompatConfig): void;+export declare function validateCompatConfig(config: CompatConfig, instance?: ComponentInternalInstance): void;+export declare function getCompatConfigForKey(key: DeprecationTypes | 'MODE', instance: ComponentInternalInstance | null): CompatConfig[DeprecationTypes | 'MODE'];+export declare function isCompatEnabled(key: DeprecationTypes, instance: ComponentInternalInstance | null, enableForBuiltIn?: boolean): boolean;+/**+ * Use this for features that are completely removed in non-compat build.+ */+export declare function assertCompatEnabled(key: DeprecationTypes, instance: ComponentInternalInstance | null, ...args: any[]): void;+/**+ * Use this for features where legacy usage is still possible, but will likely+ * lead to runtime error if compat is disabled. (warn in all cases)+ */+export declare function softAssertCompatEnabled(key: DeprecationTypes, instance: ComponentInternalInstance | null, ...args: any[]): boolean;+/**+ * Use this for features with the same syntax but with mutually exclusive+ * behavior in 2 vs 3. Only warn if compat is enabled.+ * e.g. render function+ */+export declare function checkCompatEnabled(key: DeprecationTypes, instance: ComponentInternalInstance | null, ...args: any[]): boolean;+export {};packages/runtime-core/src/compat/component.d.tsnew file mode 100644index 000000000..d914bd195@@ -0,0 +1,2 @@+import type { Component, ComponentInternalInstance } from '../component';+export declare function convertLegacyComponent(comp: any, instance: ComponentInternalInstance | null): Component;packages/runtime-core/src/compat/componentAsync.d.tsnew file mode 100644index 000000000..1c935d93c@@ -0,0 +1,12 @@+import type { Component } from '../component';+interface LegacyAsyncOptions {+    component: Promise<Component>;+    loading?: Component;+    error?: Component;+    delay?: number;+    timeout?: number;+}+type LegacyAsyncReturnValue = Promise<Component> | LegacyAsyncOptions;+type LegacyAsyncComponent = (resolve?: (res: LegacyAsyncReturnValue) => void, reject?: (reason?: any) => void) => LegacyAsyncReturnValue | undefined;+export declare function convertLegacyAsyncComponent(comp: LegacyAsyncComponent): Component;+export {};packages/runtime-core/src/compat/componentFunctional.d.tsnew file mode 100644index 000000000..712dd2b4e@@ -0,0 +1,4 @@+import { type ComponentOptions, type FunctionalComponent } from '../component';+import type { InternalSlots } from '../componentSlots';+export declare const legacySlotProxyHandlers: ProxyHandler<InternalSlots>;+export declare function convertLegacyFunctionalComponent(comp: ComponentOptions): FunctionalComponent;packages/runtime-core/src/compat/componentVModel.d.tsnew file mode 100644index 000000000..d995399f9@@ -0,0 +1,5 @@+import type { ComponentInternalInstance } from '../component';+import type { VNode } from '../vnode';+export declare const compatModelEventPrefix = "onModelCompat:";+export declare function convertLegacyVModelProps(vnode: VNode): void;+export declare function compatModelEmit(instance: ComponentInternalInstance, event: string, args: any[]): void;packages/runtime-core/src/compat/customDirective.d.tsnew file mode 100644index 000000000..2b80cc780@@ -0,0 +1,10 @@+import type { ComponentInternalInstance } from '../component';+import type { DirectiveHook, ObjectDirective } from '../directives';+export interface LegacyDirective {+    bind?: DirectiveHook;+    inserted?: DirectiveHook;+    update?: DirectiveHook;+    componentUpdated?: DirectiveHook;+    unbind?: DirectiveHook;+}+export declare function mapCompatDirectiveHook(name: keyof ObjectDirective, dir: ObjectDirective & LegacyDirective, instance: ComponentInternalInstance | null): DirectiveHook | DirectiveHook[] | undefined;packages/runtime-core/src/compat/data.d.tsnew file mode 100644index 000000000..763a7c3bf@@ -0,0 +1 @@+export declare function deepMergeData(to: any, from: any): any;packages/runtime-core/src/compat/global.d.tsnew file mode 100644index 000000000..d161f9e92@@ -0,0 +1,70 @@+import { reactive } from '@vue/reactivity';+import type { RootRenderFunction } from '../renderer';+import type { App, AppConfig, AppContext, CreateAppFunction, Plugin } from '../apiCreateApp';+import { type Component, type ComponentOptions } from '../component';+import { type RenderFunction } from '../componentOptions';+import type { Directive } from '../directives';+import { nextTick } from '../scheduler';+import { type LegacyConfig } from './globalConfig';+import { configureCompat } from './compatConfig';+import type { LegacyPublicInstance } from './instance';+/**+ * @deprecated the default `Vue` export has been removed in Vue 3. The type for+ * the default export is provided only for migration purposes. Please use+ * named imports instead - e.g. `import { createApp } from 'vue'`.+ */+export type CompatVue = Pick<App, 'version' | 'component' | 'directive'> & {+    configureCompat: typeof configureCompat;+    new (options?: ComponentOptions): LegacyPublicInstance;+    version: string;+    config: AppConfig & LegacyConfig;+    nextTick: typeof nextTick;+    use<Options extends unknown[]>(plugin: Plugin<Options>, ...options: Options): CompatVue;+    use<Options>(plugin: Plugin<Options>, options: Options): CompatVue;+    mixin(mixin: ComponentOptions): CompatVue;+    component(name: string): Component | undefined;+    component(name: string, component: Component): CompatVue;+    directive<T = any, V = any>(name: string): Directive<T, V> | undefined;+    directive<T = any, V = any>(name: string, directive: Directive<T, V>): CompatVue;+    compile(template: string): RenderFunction;+    /**+     * @deprecated Vue 3 no longer supports extending constructors.+     */+    extend: (options?: ComponentOptions) => CompatVue;+    /**+     * @deprecated Vue 3 no longer needs set() for adding new properties.+     */+    set(target: any, key: PropertyKey, value: any): void;+    /**+     * @deprecated Vue 3 no longer needs delete() for property deletions.+     */+    delete(target: any, key: PropertyKey): void;+    /**+     * @deprecated use `reactive` instead.+     */+    observable: typeof reactive;+    /**+     * @deprecated filters have been removed from Vue 3.+     */+    filter(name: string, arg?: any): null;+    /**+     * @internal+     */+    cid: number;+    /**+     * @internal+     */+    options: ComponentOptions;+    /**+     * @internal+     */+    util: any;+    /**+     * @internal+     */+    super: CompatVue;+};+export declare let isCopyingConfig: boolean;+export declare let singletonApp: App;+export declare function createCompatVue(createApp: CreateAppFunction<Element>, createSingletonApp: CreateAppFunction<Element>): CompatVue;+export declare function installAppCompatProperties(app: App, context: AppContext, render: RootRenderFunction<any>): void;packages/runtime-core/src/compat/globalConfig.d.tsnew file mode 100644index 000000000..9d75242e4@@ -0,0 +1,29 @@+import type { AppConfig } from '../apiCreateApp';+export type LegacyConfig = {+    /**+     * @deprecated `config.silent` option has been removed+     */+    silent?: boolean;+    /**+     * @deprecated use __VUE_PROD_DEVTOOLS__ compile-time feature flag instead+     * https://github.com/vuejs/core/tree/main/packages/vue#bundler-build-feature-flags+     */+    devtools?: boolean;+    /**+     * @deprecated use `config.isCustomElement` instead+     * https://v3-migration.vuejs.org/breaking-changes/global-api.html#config-ignoredelements-is-now-config-iscustomelement+     */+    ignoredElements?: (string | RegExp)[];+    /**+     * @deprecated+     * https://v3-migration.vuejs.org/breaking-changes/keycode-modifiers.html+     */+    keyCodes?: Record<string, number | number[]>;+    /**+     * @deprecated+     * https://v3-migration.vuejs.org/breaking-changes/global-api.html#config-productiontip-removed+     */+    productionTip?: boolean;+};+export declare function installLegacyConfigWarnings(config: AppConfig): void;+export declare function installLegacyOptionMergeStrats(config: AppConfig): void;packages/runtime-core/src/compat/instance.d.tsnew file mode 100644index 000000000..fdef69cb0@@ -0,0 +1,16 @@+import type { ComponentPublicInstance, PublicPropertiesMap } from '../componentPublicInstance';+import type { Slots } from '../componentSlots';+export type LegacyPublicInstance = ComponentPublicInstance & LegacyPublicProperties;+export interface LegacyPublicProperties {+    $set<T extends Record<keyof any, any>, K extends keyof T>(target: T, key: K, value: T[K]): void;+    $delete<T extends Record<keyof any, any>, K extends keyof T>(target: T, key: K): void;+    $mount(el?: string | Element): this;+    $destroy(): void;+    $scopedSlots: Slots;+    $on(event: string | string[], fn: Function): this;+    $once(event: string, fn: Function): this;+    $off(event?: string | string[], fn?: Function): this;+    $children: LegacyPublicProperties[];+    $listeners: Record<string, Function | Function[]>;+}+export declare function installCompatInstanceProperties(map: PublicPropertiesMap): void;packages/runtime-core/src/compat/instanceChildren.d.tsnew file mode 100644index 000000000..6566b526c@@ -0,0 +1,3 @@+import type { ComponentInternalInstance } from '../component';+import type { ComponentPublicInstance } from '../componentPublicInstance';+export declare function getCompatChildren(instance: ComponentInternalInstance): ComponentPublicInstance[];packages/runtime-core/src/compat/instanceEventEmitter.d.tsnew file mode 100644index 000000000..aa58009a7@@ -0,0 +1,11 @@+import type { ComponentInternalInstance } from '../component';+import type { ComponentPublicInstance } from '../componentPublicInstance';+interface EventRegistry {+    [event: string]: Function[] | undefined;+}+export declare function getRegistry(instance: ComponentInternalInstance): EventRegistry;+export declare function on(instance: ComponentInternalInstance, event: string | string[], fn: Function): ComponentPublicInstance | null;+export declare function once(instance: ComponentInternalInstance, event: string, fn: Function): ComponentPublicInstance | null;+export declare function off(instance: ComponentInternalInstance, event?: string | string[], fn?: Function): ComponentPublicInstance | null;+export declare function emit(instance: ComponentInternalInstance, event: string, args: any[]): ComponentPublicInstance | null;+export {};packages/runtime-core/src/compat/instanceListeners.d.tsnew file mode 100644index 000000000..6c3f5ae1e@@ -0,0 +1,2 @@+import type { ComponentInternalInstance } from '../component';+export declare function getCompatListeners(instance: ComponentInternalInstance): Record<string, Function | Function[]>;packages/runtime-core/src/compat/props.d.tsnew file mode 100644index 000000000..d1b5292e1@@ -0,0 +1,2 @@+import type { ComponentInternalInstance, Data } from '../component';+export declare function createPropsDefaultThis(instance: ComponentInternalInstance, rawProps: Data, propKey: string): object;packages/runtime-core/src/compat/renderFn.d.tsnew file mode 100644index 000000000..28492112c@@ -0,0 +1,36 @@+import type { Component, ComponentInternalInstance, Data } from '../component';+import { type VNode, type VNodeArrayChildren } from '../vnode';+export declare function convertLegacyRenderFn(instance: ComponentInternalInstance): void;+interface LegacyVNodeProps {+    key?: string | number;+    ref?: string;+    refInFor?: boolean;+    staticClass?: string;+    class?: unknown;+    staticStyle?: Record<string, unknown>;+    style?: Record<string, unknown>;+    attrs?: Record<string, unknown>;+    domProps?: Record<string, unknown>;+    on?: Record<string, Function | Function[]>;+    nativeOn?: Record<string, Function | Function[]>;+    directives?: LegacyVNodeDirective[];+    props?: Record<string, unknown>;+    slot?: string;+    scopedSlots?: Record<string, Function>;+    model?: {+        value: any;+        callback: (v: any) => void;+        expression: string;+    };+}+interface LegacyVNodeDirective {+    name: string;+    value: unknown;+    arg?: string;+    modifiers?: Record<string, boolean>;+}+type LegacyVNodeChildren = string | number | boolean | VNode | VNodeArrayChildren;+export declare function compatH(type: string | Component, children?: LegacyVNodeChildren): VNode;+export declare function compatH(type: string | Component, props?: Data & LegacyVNodeProps, children?: LegacyVNodeChildren): VNode;+export declare function defineLegacyVNodeProperties(vnode: VNode): void;+export {};packages/runtime-core/src/compat/renderHelpers.d.tsnew file mode 100644index 000000000..58762d3fe@@ -0,0 +1,18 @@+import type { ComponentInternalInstance, Data } from '../component';+import type { Slot } from '../componentSlots';+import { createSlots } from '../helpers/createSlots';+import { type VNode } from '../vnode';+export declare function legacyBindObjectProps(data: any, _tag: string, value: any, _asProp: boolean, isSync?: boolean): any;+export declare function legacyBindObjectListeners(props: any, listeners: any): Data;+export declare function legacyRenderSlot(instance: ComponentInternalInstance, name: string, fallback?: VNode[], props?: any, bindObject?: any): VNode;+type LegacyScopedSlotsData = Array<{+    key: string;+    fn: Function;+} | LegacyScopedSlotsData>;+export declare function legacyResolveScopedSlots(fns: LegacyScopedSlotsData, raw?: Record<string, Slot>, hasDynamicKeys?: boolean): ReturnType<typeof createSlots>;+export declare function legacyRenderStatic(instance: ComponentInternalInstance, index: number): any;+export declare function legacyCheckKeyCodes(instance: ComponentInternalInstance, eventKeyCode: number, key: string, builtInKeyCode?: number | number[], eventKeyName?: string, builtInKeyName?: string | string[]): boolean | undefined;+export declare function legacyMarkOnce(tree: VNode): VNode;+export declare function legacyBindDynamicKeys(props: any, values: any[]): any;+export declare function legacyPrependModifier(value: any, symbol: string): any;+export {};packages/runtime-core/src/component.d.tsnew file mode 100644index 000000000..d38111a66@@ -0,0 +1,489 @@+import { type VNode, type VNodeChild } from './vnode';+import { EffectScope, type ReactiveEffect } from '@vue/reactivity';+import { type ComponentPublicInstance, type ComponentPublicInstanceConstructor } from './componentPublicInstance';+import { type ComponentPropsOptions, type NormalizedPropsOptions } from './componentProps';+import { type InternalSlots, type Slots, type SlotsType, type UnwrapSlotsType } from './componentSlots';+import { type AppConfig, type AppContext } from './apiCreateApp';+import { type Directive } from './directives';+import { type ComponentOptions, type ComputedOptions, type MergedComponentOptions, type MethodOptions } from './componentOptions';+import { type EmitFn, type EmitsOptions, type EmitsToProps, type ObjectEmitsOptions, type ShortEmitsToObject } from './componentEmits';+import { type IfAny } from '@vue/shared';+import type { SuspenseBoundary } from './components/Suspense';+import { type CompatConfig } from './compat/compatConfig';+import type { SchedulerJob } from './scheduler';+import type { LifecycleHooks } from './enums';+import type { TeleportProps } from './components/Teleport';+import type { SuspenseProps } from './components/Suspense';+import type { KeepAliveProps } from './components/KeepAlive';+import type { BaseTransitionProps } from './components/BaseTransition';+import type { DefineComponent } from './apiDefineComponent';+import type { RendererElement } from './renderer';+export type Data = Record<string, unknown>;+/**+ * For extending allowed non-declared attrs on components in TSX+ */+export interface AllowedAttrs {+}+export type Attrs = Data & AllowedAttrs;+/**+ * Public utility type for extracting the instance type of a component.+ * Works with all valid component definition types. This is intended to replace+ * the usage of `InstanceType<typeof Comp>` which only works for+ * constructor-based component definition types.+ *+ * @example+ * ```ts+ * const MyComp = { ... }+ * declare const instance: ComponentInstance<typeof MyComp>+ * ```+ */+export type ComponentInstance<T> = T extends {+    new (): ComponentPublicInstance;+} ? InstanceType<T> : T extends FunctionalComponent<infer Props, infer Emits> ? ComponentPublicInstance<Props, {}, {}, {}, {}, ShortEmitsToObject<Emits>> : T extends Component<infer PropsOrInstance, infer RawBindings, infer D, infer C, infer M> ? PropsOrInstance extends {+    $props: unknown;+} ? PropsOrInstance : ComponentPublicInstance<unknown extends PropsOrInstance ? {} : PropsOrInstance, unknown extends RawBindings ? {} : RawBindings, unknown extends D ? {} : D, C, M> : never;+/**+ * For extending allowed non-declared props on components in TSX+ */+export interface ComponentCustomProps {+}+/**+ * For globally defined Directives+ * Here is an example of adding a directive `VTooltip` as global directive:+ *+ * @example+ * ```ts+ * import VTooltip from 'v-tooltip'+ *+ * declare module '@vue/runtime-core' {+ *   interface GlobalDirectives {+ *     VTooltip+ *   }+ * }+ * ```+ */+export interface GlobalDirectives {+}+/**+ * For globally defined Components+ * Here is an example of adding a component `RouterView` as global component:+ *+ * @example+ * ```ts+ * import { RouterView } from 'vue-router'+ *+ * declare module '@vue/runtime-core' {+ *   interface GlobalComponents {+ *     RouterView+ *   }+ * }+ * ```+ */+export interface GlobalComponents {+    Teleport: DefineComponent<TeleportProps>;+    Suspense: DefineComponent<SuspenseProps>;+    KeepAlive: DefineComponent<KeepAliveProps>;+    BaseTransition: DefineComponent<BaseTransitionProps>;+}+/**+ * Default allowed non-declared props on component in TSX+ */+export interface AllowedComponentProps {+    class?: unknown;+    style?: unknown;+}+export interface ComponentInternalOptions {+    /**+     * @internal+     */+    __scopeId?: string;+    /**+     * @internal+     */+    __cssModules?: Data;+    /**+     * @internal+     */+    __hmrId?: string;+    /**+     * Compat build only, for bailing out of certain compatibility behavior+     */+    __isBuiltIn?: boolean;+    /**+     * This one should be exposed so that devtools can make use of it+     */+    __file?: string;+    /**+     * name inferred from filename+     */+    __name?: string;+}+export interface FunctionalComponent<P = {}, E extends EmitsOptions | Record<string, any[]> = {}, S extends Record<string, any> = any, EE extends EmitsOptions = ShortEmitsToObject<E>> extends ComponentInternalOptions {+    (props: P & EmitsToProps<EE>, ctx: Omit<SetupContext<EE, IfAny<S, {}, SlotsType<S>>>, 'expose'>): any;+    props?: ComponentPropsOptions<P>;+    emits?: EE | (keyof EE)[];+    slots?: IfAny<S, Slots, SlotsType<S>>;+    inheritAttrs?: boolean;+    displayName?: string;+    compatConfig?: CompatConfig;+}+export interface ClassComponent {+    new (...args: any[]): ComponentPublicInstance<any, any, any, any, any>;+    __vccOpts: ComponentOptions;+}+/**+ * Concrete component type matches its actual value: it's either an options+ * object, or a function. Use this where the code expects to work with actual+ * values, e.g. checking if its a function or not. This is mostly for internal+ * implementation code.+ */+export type ConcreteComponent<Props = {}, RawBindings = any, D = any, C extends ComputedOptions = ComputedOptions, M extends MethodOptions = MethodOptions, E extends EmitsOptions | Record<string, any[]> = {}, S extends Record<string, any> = any> = ComponentOptions<Props, RawBindings, D, C, M> | FunctionalComponent<Props, E, S>;+/**+ * A type used in public APIs where a component type is expected.+ * The constructor type is an artificial type returned by defineComponent().+ */+export type Component<PropsOrInstance = any, RawBindings = any, D = any, C extends ComputedOptions = ComputedOptions, M extends MethodOptions = MethodOptions, E extends EmitsOptions | Record<string, any[]> = {}, S extends Record<string, any> = any> = ConcreteComponent<PropsOrInstance, RawBindings, D, C, M, E, S> | ComponentPublicInstanceConstructor<PropsOrInstance>;+export type { ComponentOptions };+export type LifecycleHook<TFn = Function> = (TFn & SchedulerJob)[] | null;+export type SetupContext<E = EmitsOptions, S extends SlotsType = {}> = E extends any ? {+    attrs: Attrs;+    slots: UnwrapSlotsType<S>;+    emit: EmitFn<E>;+    expose: <Exposed extends Record<string, any> = Record<string, any>>(exposed?: Exposed) => void;+} : never;+/**+ * @internal+ */+export type InternalRenderFunction = {+    (ctx: ComponentPublicInstance, cache: ComponentInternalInstance['renderCache'], $props: ComponentInternalInstance['props'], $setup: ComponentInternalInstance['setupState'], $data: ComponentInternalInstance['data'], $options: ComponentInternalInstance['ctx']): VNodeChild;+    _rc?: boolean;+    _compatChecked?: boolean;+    _compatWrapped?: boolean;+};+/**+ * We expose a subset of properties on the internal instance as they are+ * useful for advanced external libraries and tools.+ */+export interface ComponentInternalInstance {+    uid: number;+    type: ConcreteComponent;+    parent: ComponentInternalInstance | null;+    root: ComponentInternalInstance;+    appContext: AppContext;+    /**+     * Vnode representing this component in its parent's vdom tree+     */+    vnode: VNode;+    /**+     * The pending new vnode from parent updates+     * @internal+     */+    next: VNode | null;+    /**+     * Root vnode of this component's own vdom tree+     */+    subTree: VNode;+    /**+     * Render effect instance+     */+    effect: ReactiveEffect;+    /**+     * Force update render effect+     */+    update: () => void;+    /**+     * Render effect job to be passed to scheduler (checks if dirty)+     */+    job: SchedulerJob;+    /**+     * The render function that returns vdom tree.+     * @internal+     */+    render: InternalRenderFunction | null;+    /**+     * SSR render function+     * @internal+     */+    ssrRender?: Function | null;+    /**+     * Object containing values this component provides for its descendants+     * @internal+     */+    provides: Data;+    /**+     * for tracking useId()+     * first element is the current boundary prefix+     * second number is the index of the useId call within that boundary+     * @internal+     */+    ids: [string, number, number];+    /**+     * Tracking reactive effects (e.g. watchers) associated with this component+     * so that they can be automatically stopped on component unmount+     * @internal+     */+    scope: EffectScope;+    /**+     * cache for proxy access type to avoid hasOwnProperty calls+     * @internal+     */+    accessCache: Data | null;+    /**+     * cache for render function values that rely on _ctx but won't need updates+     * after initialized (e.g. inline handlers)+     * @internal+     */+    renderCache: (Function | VNode | undefined)[];+    /**+     * Resolved component registry, only for components with mixins or extends+     * @internal+     */+    components: Record<string, ConcreteComponent> | null;+    /**+     * Resolved directive registry, only for components with mixins or extends+     * @internal+     */+    directives: Record<string, Directive> | null;+    /**+     * Resolved filters registry, v2 compat only+     * @internal+     */+    filters?: Record<string, Function>;+    /**+     * resolved props options+     * @internal+     */+    propsOptions: NormalizedPropsOptions;+    /**+     * resolved emits options+     * @internal+     */+    emitsOptions: ObjectEmitsOptions | null;+    /**+     * resolved inheritAttrs options+     * @internal+     */+    inheritAttrs?: boolean;+    /**+     * Custom Element instance (if component is created by defineCustomElement)+     * @internal+     */+    ce?: ComponentCustomElementInterface;+    /**+     * is custom element? (kept only for compatibility)+     * @internal+     */+    isCE?: boolean;+    /**+     * custom element specific HMR method+     * @internal+     */+    ceReload?: (newStyles?: string[]) => void;+    proxy: ComponentPublicInstance | null;+    exposed: Record<string, any> | null;+    exposeProxy: Record<string, any> | null;+    /**+     * alternative proxy used only for runtime-compiled render functions using+     * `with` block+     * @internal+     */+    withProxy: ComponentPublicInstance | null;+    /**+     * This is the target for the public instance proxy. It also holds properties+     * injected by user options (computed, methods etc.) and user-attached+     * custom properties (via `this.x = ...`)+     * @internal+     */+    ctx: Data;+    data: Data;+    props: Data;+    attrs: Data;+    slots: InternalSlots;+    refs: Data;+    emit: EmitFn;+    /**+     * used for keeping track of .once event handlers on components+     * @internal+     */+    emitted: Record<string, boolean> | null;+    /**+     * used for caching the value returned from props default factory functions to+     * avoid unnecessary watcher trigger+     * @internal+     */+    propsDefaults: Data;+    /**+     * setup related+     * @internal+     */+    setupState: Data;+    /**+     * devtools access to additional info+     * @internal+     */+    devtoolsRawSetupState?: any;+    /**+     * @internal+     */+    setupContext: SetupContext | null;+    /**+     * suspense related+     * @internal+     */+    suspense: SuspenseBoundary | null;+    /**+     * suspense pending batch id+     * @internal+     */+    suspenseId: number;+    /**+     * @internal+     */+    asyncDep: Promise<any> | null;+    /**+     * @internal+     */+    asyncResolved: boolean;+    isMounted: boolean;+    isUnmounted: boolean;+    isDeactivated: boolean;+    /**+     * @internal+     */+    [LifecycleHooks.BEFORE_CREATE]: LifecycleHook;+    /**+     * @internal+     */+    [LifecycleHooks.CREATED]: LifecycleHook;+    /**+     * @internal+     */+    [LifecycleHooks.BEFORE_MOUNT]: LifecycleHook;+    /**+     * @internal+     */+    [LifecycleHooks.MOUNTED]: LifecycleHook;+    /**+     * @internal+     */+    [LifecycleHooks.BEFORE_UPDATE]: LifecycleHook;+    /**+     * @internal+     */+    [LifecycleHooks.UPDATED]: LifecycleHook;+    /**+     * @internal+     */+    [LifecycleHooks.BEFORE_UNMOUNT]: LifecycleHook;+    /**+     * @internal+     */+    [LifecycleHooks.UNMOUNTED]: LifecycleHook;+    /**+     * @internal+     */+    [LifecycleHooks.RENDER_TRACKED]: LifecycleHook;+    /**+     * @internal+     */+    [LifecycleHooks.RENDER_TRIGGERED]: LifecycleHook;+    /**+     * @internal+     */+    [LifecycleHooks.ACTIVATED]: LifecycleHook;+    /**+     * @internal+     */+    [LifecycleHooks.DEACTIVATED]: LifecycleHook;+    /**+     * @internal+     */+    [LifecycleHooks.ERROR_CAPTURED]: LifecycleHook;+    /**+     * @internal+     */+    [LifecycleHooks.SERVER_PREFETCH]: LifecycleHook<() => Promise<unknown>>;+    /**+     * For caching bound $forceUpdate on public proxy access+     * @internal+     */+    f?: () => void;+    /**+     * For caching bound $nextTick on public proxy access+     * @internal+     */+    n?: () => Promise<void>;+    /**+     * `updateTeleportCssVars`+     * For updating css vars on contained teleports+     * @internal+     */+    ut?: (vars?: Record<string, unknown>) => void;+    /**+     * dev only. For style v-bind hydration mismatch checks+     * @internal+     */+    getCssVars?: () => Record<string, unknown>;+    /**+     * v2 compat only, for caching mutated $options+     * @internal+     */+    resolvedOptions?: MergedComponentOptions;+}+export declare function createComponentInstance(vnode: VNode, parent: ComponentInternalInstance | null, suspense: SuspenseBoundary | null): ComponentInternalInstance;+export declare let currentInstance: ComponentInternalInstance | null;+export declare const getCurrentInstance: () => ComponentInternalInstance | null;+export declare let setInSSRSetupState: (state: boolean) => void;+export declare const setCurrentInstance: (instance: ComponentInternalInstance) => () => void;+export declare const unsetCurrentInstance: () => void;+export declare function validateComponentName(name: string, { isNativeTag }: AppConfig): void;+export declare function isStatefulComponent(instance: ComponentInternalInstance): number;+export declare let isInSSRComponentSetup: boolean;+export declare function setupComponent(instance: ComponentInternalInstance, isSSR?: boolean, optimized?: boolean): Promise<void> | undefined;+export declare function handleSetupResult(instance: ComponentInternalInstance, setupResult: unknown, isSSR: boolean): void;+/**+ * For runtime-dom to register the compiler.+ * Note the exported method uses any to avoid d.ts relying on the compiler types.+ */+export declare function registerRuntimeCompiler(_compile: any): void;+export declare const isRuntimeOnly: () => boolean;+export declare function finishComponentSetup(instance: ComponentInternalInstance, isSSR: boolean, skipOptions?: boolean): void;+export declare function createSetupContext(instance: ComponentInternalInstance): SetupContext;+export declare function getComponentPublicInstance(instance: ComponentInternalInstance): ComponentPublicInstance | ComponentInternalInstance['exposed'] | null;+export declare function getComponentName(Component: ConcreteComponent, includeInferred?: boolean): string | false | undefined;+export declare function formatComponentName(instance: ComponentInternalInstance | null, Component: ConcreteComponent, isRoot?: boolean): string;+export declare function isClassComponent(value: unknown): value is ClassComponent;+export interface ComponentCustomElementInterface {+    /**+     * @internal+     */+    _isVueCE: boolean;+    /**+     * @internal+     */+    _injectChildStyle(type: ConcreteComponent, parent?: ConcreteComponent): void;+    /**+     * @internal+     */+    _removeChildStyle(type: ConcreteComponent): void;+    /**+     * @internal+     */+    _setProp(key: string, val: any, shouldReflect?: boolean, shouldUpdate?: boolean): void;+    /**+     * @internal+     */+    _beginPatch(): void;+    /**+     * @internal+     */+    _endPatch(): void;+    /**+     * @internal attached by the nested Teleport when shadowRoot is false.+     */+    _teleportTargets?: Set<RendererElement>;+    /**+     * @internal check if shadow root is enabled+     */+    _hasShadowRoot(): boolean;+}packages/runtime-core/src/componentEmits.d.tsnew file mode 100644index 000000000..a40a01b4e@@ -0,0 +1,29 @@+import { type OverloadParameters, type UnionToIntersection } from '@vue/shared';+import { type ComponentInternalInstance, type ConcreteComponent } from './component';+import type { AppContext } from './apiCreateApp';+import type { ComponentTypeEmits } from './apiSetupHelpers';+import type { ComponentPublicInstance } from './componentPublicInstance';+export type ObjectEmitsOptions = Record<string, ((...args: any[]) => any) | null | any[]>;+export type EmitsOptions = ObjectEmitsOptions | string[];+export type EmitsToProps<T extends EmitsOptions | ComponentTypeEmits> = T extends string[] ? {+    [K in `on${Capitalize<T[number]>}`]?: (...args: any[]) => any;+} : T extends ObjectEmitsOptions ? {+    [K in string & keyof T as `on${Capitalize<K>}`]?: (...args: T[K] extends (...args: infer P) => any ? P : T[K] extends null ? any[] : T[K] extends any[] ? T[K] : never) => any;+} : {};+export type TypeEmitsToOptions<T extends ComponentTypeEmits> = {+    [K in keyof T & string]: T[K] extends [...args: infer Args] ? (...args: Args) => any : () => any;+} & (T extends (...args: any[]) => any ? ParametersToFns<OverloadParameters<T>> : {});+type ParametersToFns<T extends any[]> = {+    [K in T[0]]: IsStringLiteral<K> extends true ? (...args: T extends [e: infer E, ...args: infer P] ? K extends E ? P : never : never) => any : never;+};+type IsStringLiteral<T> = T extends string ? string extends T ? false : true : false;+export type ShortEmitsToObject<E> = E extends Record<string, any[]> ? {+    [K in keyof E]: (...args: E[K]) => any;+} : E;+export type EmitFn<Options = ObjectEmitsOptions, Event extends keyof Options = keyof Options> = Options extends Array<infer V> ? (event: V, ...args: any[]) => void : {} extends Options ? (event: string, ...args: any[]) => void : UnionToIntersection<{+    [key in Event]: Options[key] extends (...args: infer Args) => any ? (event: key, ...args: Args) => void : Options[key] extends any[] ? (event: key, ...args: Options[key]) => void : (event: key, ...args: any[]) => void;+}[Event]>;+export declare function emit(instance: ComponentInternalInstance, event: string, ...rawArgs: any[]): ComponentPublicInstance | null | undefined;+export declare function normalizeEmitsOptions(comp: ConcreteComponent, appContext: AppContext, asMixin?: boolean): ObjectEmitsOptions | null;+export declare function isEmitListener(options: ObjectEmitsOptions | null, key: string): boolean;+export {};packages/runtime-core/src/componentOptions.d.tsnew file mode 100644index 000000000..4efd4deda@@ -0,0 +1,232 @@+import { type Component, type ComponentInternalInstance, type ComponentInternalOptions, type ConcreteComponent, type Data, type SetupContext } from './component';+import { type LooseRequired, type Prettify } from '@vue/shared';+import { type WatchCallback, type WatchOptions } from './apiWatch';+import { type DebuggerHook, type ErrorCapturedHook } from './apiLifecycle';+import { type ComputedGetter, type WritableComputedOptions } from '@vue/reactivity';+import type { ComponentObjectPropsOptions, ExtractDefaultPropTypes, ExtractPropTypes } from './componentProps';+import type { EmitsOptions, EmitsToProps, TypeEmitsToOptions } from './componentEmits';+import type { Directive } from './directives';+import { type ComponentPublicInstance, type CreateComponentPublicInstanceWithMixins, type IntersectionMixin, type UnwrapMixinsType } from './componentPublicInstance';+import type { VNodeChild } from './vnode';+import { type CompatConfig } from './compat/compatConfig';+import type { OptionMergeFunction } from './apiCreateApp';+import type { SlotsType } from './componentSlots';+import { type ComponentTypeEmits } from './apiSetupHelpers';+/**+ * Interface for declaring custom options.+ *+ * @example+ * ```ts+ * declare module 'vue' {+ *   interface ComponentCustomOptions {+ *     beforeRouteUpdate?(+ *       to: Route,+ *       from: Route,+ *       next: () => void+ *     ): void+ *   }+ * }+ * ```+ */+export interface ComponentCustomOptions {+}+export type RenderFunction = () => VNodeChild;+export interface ComponentOptionsBase<Props, RawBindings, D, C extends ComputedOptions, M extends MethodOptions, Mixin extends ComponentOptionsMixin, Extends extends ComponentOptionsMixin, E extends EmitsOptions, EE extends string = string, Defaults = {}, I extends ComponentInjectOptions = {}, II extends string = string, S extends SlotsType = {}, LC extends Record<string, Component> = {}, Directives extends Record<string, Directive> = {}, Exposed extends string = string, Provide extends ComponentProvideOptions = ComponentProvideOptions> extends LegacyOptions<Props, D, C, M, Mixin, Extends, I, II, Provide>, ComponentInternalOptions, ComponentCustomOptions {+    setup?: (this: void, props: LooseRequired<Props & Prettify<UnwrapMixinsType<IntersectionMixin<Mixin> & IntersectionMixin<Extends>, 'P'>>>, ctx: SetupContext<E, S>) => Promise<RawBindings> | RawBindings | RenderFunction | void;+    name?: string;+    template?: string | object;+    render?: Function;+    components?: LC & Record<string, Component>;+    directives?: Directives & Record<string, Directive>;+    inheritAttrs?: boolean;+    emits?: (E | EE[]) & ThisType<void>;+    slots?: S;+    expose?: Exposed[];+    serverPrefetch?(): void | Promise<any>;+    compilerOptions?: RuntimeCompilerOptions;+    /**+     * SSR only. This is produced by compiler-ssr and attached in compiler-sfc+     * not user facing, so the typing is lax and for test only.+     * @internal+     */+    ssrRender?: (ctx: any, push: (item: any) => void, parentInstance: ComponentInternalInstance, attrs: Data | undefined, $props: ComponentInternalInstance['props'], $setup: ComponentInternalInstance['setupState'], $data: ComponentInternalInstance['data'], $options: ComponentInternalInstance['ctx']) => void;+    /**+     * Only generated by compiler-sfc to mark a ssr render function inlined and+     * returned from setup()+     * @internal+     */+    __ssrInlineRender?: boolean;+    /**+     * marker for AsyncComponentWrapper+     * @internal+     */+    __asyncLoader?: () => Promise<ConcreteComponent>;+    /**+     * the inner component resolved by the AsyncComponentWrapper+     * @internal+     */+    __asyncResolved?: ConcreteComponent;+    /**+     * Exposed for lazy hydration+     * @internal+     */+    __asyncHydrate?: (el: Element, instance: ComponentInternalInstance, hydrate: () => void) => void;+    call?: (this: unknown, ...args: unknown[]) => never;+    __isFragment?: never;+    __isTeleport?: never;+    __isSuspense?: never;+    __defaults?: Defaults;+}+/**+ * Subset of compiler options that makes sense for the runtime.+ */+export interface RuntimeCompilerOptions {+    isCustomElement?: (tag: string) => boolean;+    whitespace?: 'preserve' | 'condense';+    comments?: boolean;+    delimiters?: [string, string];+}+export type ComponentOptions<Props = {}, RawBindings = any, D = any, C extends ComputedOptions = any, M extends MethodOptions = any, Mixin extends ComponentOptionsMixin = any, Extends extends ComponentOptionsMixin = any, E extends EmitsOptions = any, EE extends string = string, Defaults = {}, I extends ComponentInjectOptions = {}, II extends string = string, S extends SlotsType = {}, LC extends Record<string, Component> = {}, Directives extends Record<string, Directive> = {}, Exposed extends string = string, Provide extends ComponentProvideOptions = ComponentProvideOptions> = ComponentOptionsBase<Props, RawBindings, D, C, M, Mixin, Extends, E, EE, Defaults, I, II, S, LC, Directives, Exposed, Provide> & ThisType<CreateComponentPublicInstanceWithMixins<{}, RawBindings, D, C, M, Mixin, Extends, E, Readonly<Props>, Defaults, false, I, S, LC, Directives>>;+export type ComponentOptionsMixin = ComponentOptionsBase<any, any, any, any, any, any, any, any, any, any, any, any, any, any, any, any, any>;+export type ComputedOptions = Record<string, ComputedGetter<any> | WritableComputedOptions<any>>;+export interface MethodOptions {+    [key: string]: Function;+}+export type ExtractComputedReturns<T extends any> = {+    [key in keyof T]: T[key] extends {+        get: (...args: any[]) => infer TReturn;+    } ? TReturn : T[key] extends (...args: any[]) => infer TReturn ? TReturn : never;+};+export type ObjectWatchOptionItem = {+    handler: WatchCallback | string;+} & WatchOptions;+type WatchOptionItem = string | WatchCallback | ObjectWatchOptionItem;+type ComponentWatchOptionItem = WatchOptionItem | WatchOptionItem[];+type ComponentWatchOptions = Record<string, ComponentWatchOptionItem>;+export type ComponentProvideOptions = ObjectProvideOptions | Function;+type ObjectProvideOptions = Record<string | symbol, unknown>;+export type ComponentInjectOptions = string[] | ObjectInjectOptions;+type ObjectInjectOptions = Record<string | symbol, string | symbol | {+    from?: string | symbol;+    default?: unknown;+}>;+export type InjectToObject<T extends ComponentInjectOptions> = T extends string[] ? {+    [K in T[number]]?: unknown;+} : T extends ObjectInjectOptions ? {+    [K in keyof T]?: unknown;+} : never;+interface LegacyOptions<Props, D, C extends ComputedOptions, M extends MethodOptions, Mixin extends ComponentOptionsMixin, Extends extends ComponentOptionsMixin, I extends ComponentInjectOptions, II extends string, Provide extends ComponentProvideOptions = ComponentProvideOptions> {+    compatConfig?: CompatConfig;+    [key: string]: any;+    data?: (this: CreateComponentPublicInstanceWithMixins<Props, {}, {}, {}, MethodOptions, Mixin, Extends>, vm: CreateComponentPublicInstanceWithMixins<Props, {}, {}, {}, MethodOptions, Mixin, Extends>) => D;+    computed?: C;+    methods?: M;+    watch?: ComponentWatchOptions;+    provide?: Provide;+    inject?: I | II[];+    filters?: Record<string, Function>;+    mixins?: Mixin[];+    extends?: Extends;+    beforeCreate?(): any;+    created?(): any;+    beforeMount?(): any;+    mounted?(): any;+    beforeUpdate?(): any;+    updated?(): any;+    activated?(): any;+    deactivated?(): any;+    /** @deprecated use `beforeUnmount` instead */+    beforeDestroy?(): any;+    beforeUnmount?(): any;+    /** @deprecated use `unmounted` instead */+    destroyed?(): any;+    unmounted?(): any;+    renderTracked?: DebuggerHook;+    renderTriggered?: DebuggerHook;+    errorCaptured?: ErrorCapturedHook;+    /**+     * runtime compile only+     * @deprecated use `compilerOptions.delimiters` instead.+     */+    delimiters?: [string, string];+    /**+     * #3468+     *+     * type-only, used to assist Mixin's type inference,+     * TypeScript will try to simplify the inferred `Mixin` type,+     * with the `__differentiator`, TypeScript won't be able to combine different mixins,+     * because the `__differentiator` will be different+     */+    __differentiator?: keyof D | keyof C | keyof M;+}+type MergedHook<T = () => void> = T | T[];+export type MergedComponentOptions = ComponentOptions & MergedComponentOptionsOverride;+export type MergedComponentOptionsOverride = {+    beforeCreate?: MergedHook;+    created?: MergedHook;+    beforeMount?: MergedHook;+    mounted?: MergedHook;+    beforeUpdate?: MergedHook;+    updated?: MergedHook;+    activated?: MergedHook;+    deactivated?: MergedHook;+    /** @deprecated use `beforeUnmount` instead */+    beforeDestroy?: MergedHook;+    beforeUnmount?: MergedHook;+    /** @deprecated use `unmounted` instead */+    destroyed?: MergedHook;+    unmounted?: MergedHook;+    renderTracked?: MergedHook<DebuggerHook>;+    renderTriggered?: MergedHook<DebuggerHook>;+    errorCaptured?: MergedHook<ErrorCapturedHook>;+};+export type OptionTypesKeys = 'P' | 'B' | 'D' | 'C' | 'M' | 'Defaults';+export type OptionTypesType<P = {}, B = {}, D = {}, C extends ComputedOptions = {}, M extends MethodOptions = {}, Defaults = {}> = {+    P: P;+    B: B;+    D: D;+    C: C;+    M: M;+    Defaults: Defaults;+};+export declare let shouldCacheAccess: boolean;+export declare function applyOptions(instance: ComponentInternalInstance): void;+export declare function resolveInjections(injectOptions: ComponentInjectOptions, ctx: any, checkDuplicateProperties?: any): void;+export declare function createWatcher(raw: ComponentWatchOptionItem, ctx: Data, publicThis: ComponentPublicInstance, key: string): void;+/**+ * Resolve merged options and cache it on the component.+ * This is done only once per-component since the merging does not involve+ * instances.+ */+export declare function resolveMergedOptions(instance: ComponentInternalInstance): MergedComponentOptions;+export declare function mergeOptions(to: any, from: any, strats: Record<string, OptionMergeFunction>, asMixin?: boolean): any;+export declare const internalOptionMergeStrats: Record<string, Function>;+/**+ * @deprecated+ */+export type ComponentOptionsWithoutProps<Props = {}, RawBindings = {}, D = {}, C extends ComputedOptions = {}, M extends MethodOptions = {}, Mixin extends ComponentOptionsMixin = ComponentOptionsMixin, Extends extends ComponentOptionsMixin = ComponentOptionsMixin, E extends EmitsOptions = {}, EE extends string = string, I extends ComponentInjectOptions = {}, II extends string = string, S extends SlotsType = {}, LC extends Record<string, Component> = {}, Directives extends Record<string, Directive> = {}, Exposed extends string = string, Provide extends ComponentProvideOptions = ComponentProvideOptions, TE extends ComponentTypeEmits = {}, ResolvedEmits extends EmitsOptions = {} extends E ? TypeEmitsToOptions<TE> : E, PE = Props & EmitsToProps<ResolvedEmits>> = ComponentOptionsBase<PE, RawBindings, D, C, M, Mixin, Extends, E, EE, {}, I, II, S, LC, Directives, Exposed, Provide> & {+    props?: never;+    /**+     * @private for language-tools use only+     */+    __typeProps?: Props;+    /**+     * @private for language-tools use only+     */+    __typeEmits?: TE;+} & ThisType<CreateComponentPublicInstanceWithMixins<PE, RawBindings, D, C, M, Mixin, Extends, ResolvedEmits, EE, {}, false, I, S, LC, Directives, string>>;+/**+ * @deprecated+ */+export type ComponentOptionsWithArrayProps<PropNames extends string = string, RawBindings = {}, D = {}, C extends ComputedOptions = {}, M extends MethodOptions = {}, Mixin extends ComponentOptionsMixin = ComponentOptionsMixin, Extends extends ComponentOptionsMixin = ComponentOptionsMixin, E extends EmitsOptions = EmitsOptions, EE extends string = string, I extends ComponentInjectOptions = {}, II extends string = string, S extends SlotsType = {}, LC extends Record<string, Component> = {}, Directives extends Record<string, Directive> = {}, Exposed extends string = string, Provide extends ComponentProvideOptions = ComponentProvideOptions, Props = Prettify<Readonly<{+    [key in PropNames]?: any;+} & EmitsToProps<E>>>> = ComponentOptionsBase<Props, RawBindings, D, C, M, Mixin, Extends, E, EE, {}, I, II, S, LC, Directives, Exposed, Provide> & {+    props: PropNames[];+} & ThisType<CreateComponentPublicInstanceWithMixins<Props, RawBindings, D, C, M, Mixin, Extends, E, Props, {}, false, I, S, LC, Directives, string>>;+/**+ * @deprecated+ */+export type ComponentOptionsWithObjectProps<PropsOptions = ComponentObjectPropsOptions, RawBindings = {}, D = {}, C extends ComputedOptions = {}, M extends MethodOptions = {}, Mixin extends ComponentOptionsMixin = ComponentOptionsMixin, Extends extends ComponentOptionsMixin = ComponentOptionsMixin, E extends EmitsOptions = EmitsOptions, EE extends string = string, I extends ComponentInjectOptions = {}, II extends string = string, S extends SlotsType = {}, LC extends Record<string, Component> = {}, Directives extends Record<string, Directive> = {}, Exposed extends string = string, Provide extends ComponentProvideOptions = ComponentProvideOptions, Props = Prettify<Readonly<ExtractPropTypes<PropsOptions>> & Readonly<EmitsToProps<E>>>, Defaults = ExtractDefaultPropTypes<PropsOptions>> = ComponentOptionsBase<Props, RawBindings, D, C, M, Mixin, Extends, E, EE, Defaults, I, II, S, LC, Directives, Exposed, Provide> & {+    props: PropsOptions & ThisType<void>;+} & ThisType<CreateComponentPublicInstanceWithMixins<Props, RawBindings, D, C, M, Mixin, Extends, E, Props, Defaults, false, I, S, LC, Directives>>;+export {};packages/runtime-core/src/componentProps.d.tsnew file mode 100644index 000000000..9331b883c@@ -0,0 +1,119 @@+import { type IfAny } from '@vue/shared';+import { type ComponentInternalInstance, type ConcreteComponent, type Data } from './component';+import type { AppContext } from './apiCreateApp';+export type ComponentPropsOptions<P = Data> = ComponentObjectPropsOptions<P> | string[];+export type ComponentObjectPropsOptions<P = Data> = {+    [K in keyof P]: Prop<P[K]> | null;+};+export type Prop<T, D = T> = PropOptions<T, D> | PropType<T>;+type DefaultFactory<T> = (props: Data) => T | null | undefined;+export interface PropOptions<T = any, D = T> {+    type?: PropType<T> | true | null;+    required?: boolean;+    default?: D | DefaultFactory<D> | null | undefined | object;+    validator?(value: unknown, props: Data): boolean;+    /**+     * @internal+     */+    skipCheck?: boolean;+    /**+     * @internal+     */+    skipFactory?: boolean;+}+export type PropType<T> = PropConstructor<T> | (PropConstructor<T> | null)[];+type PropConstructor<T = any> = {+    new (...args: any[]): T & {};+} | {+    (): T;+} | PropMethod<T>;+type PropMethod<T, TConstructor = any> = [T] extends [+    ((...args: any) => any) | undefined+] ? {+    new (): TConstructor;+    (): T;+    readonly prototype: TConstructor;+} : never;+type RequiredKeys<T> = {+    [K in keyof T]: T[K] extends {+        required: true;+    } | {+        default: any;+    } | BooleanConstructor | {+        type: BooleanConstructor;+    } ? T[K] extends {+        default: undefined | (() => undefined);+    } ? never : K : never;+}[keyof T];+type OptionalKeys<T> = Exclude<keyof T, RequiredKeys<T>>;+type DefaultKeys<T> = {+    [K in keyof T]: T[K] extends {+        default: any;+    } | BooleanConstructor | {+        type: BooleanConstructor;+    } ? T[K] extends {+        type: BooleanConstructor;+        required: true;+    } ? never : K : never;+}[keyof T];+type InferPropType<T, NullAsAny = true> = [T] extends [null] ? NullAsAny extends true ? any : null : [T] extends [{+    type: null | true;+}] ? any : [T] extends [ObjectConstructor | {+    type: ObjectConstructor;+}] ? Record<string, any> : [T] extends [BooleanConstructor | {+    type: BooleanConstructor;+}] ? boolean : [T] extends [DateConstructor | {+    type: DateConstructor;+}] ? Date : [T] extends [(infer U)[] | {+    type: (infer U)[];+}] ? U extends DateConstructor ? Date | InferPropType<U, false> : InferPropType<U, false> : [T] extends [Prop<infer V, infer D>] ? unknown extends V ? keyof V extends never ? IfAny<V, V, D> : V : V : T;+/**+ * Extract prop types from a runtime props options object.+ * The extracted types are **internal** - i.e. the resolved props received by+ * the component.+ * - Boolean props are always present+ * - Props with default values are always present+ *+ * To extract accepted props from the parent, use {@link ExtractPublicPropTypes}.+ */+export type ExtractPropTypes<O> = {+    [K in keyof Pick<O, RequiredKeys<O>>]: O[K] extends {+        default: any;+    } ? Exclude<InferPropType<O[K]>, undefined> : InferPropType<O[K]>;+} & {+    [K in keyof Pick<O, OptionalKeys<O>>]?: InferPropType<O[K]>;+};+type PublicRequiredKeys<T> = {+    [K in keyof T]: T[K] extends {+        required: true;+    } ? K : never;+}[keyof T];+type PublicOptionalKeys<T> = Exclude<keyof T, PublicRequiredKeys<T>>;+/**+ * Extract prop types from a runtime props options object.+ * The extracted types are **public** - i.e. the expected props that can be+ * passed to component.+ */+export type ExtractPublicPropTypes<O> = {+    [K in keyof Pick<O, PublicRequiredKeys<O>>]: InferPropType<O[K]>;+} & {+    [K in keyof Pick<O, PublicOptionalKeys<O>>]?: InferPropType<O[K]>;+};+declare enum BooleanFlags {+    shouldCast = 0,+    shouldCastTrue = 1+}+export type ExtractDefaultPropTypes<O> = O extends object ? {+    [K in keyof Pick<O, DefaultKeys<O>>]: InferPropType<O[K]>;+} : {};+type NormalizedProp = PropOptions & {+    [BooleanFlags.shouldCast]?: boolean;+    [BooleanFlags.shouldCastTrue]?: boolean;+};+export type NormalizedProps = Record<string, NormalizedProp>;+export type NormalizedPropsOptions = [NormalizedProps, string[]] | [];+export declare function initProps(instance: ComponentInternalInstance, rawProps: Data | null, isStateful: number, // result of bitwise flag comparison+isSSR?: boolean): void;+export declare function updateProps(instance: ComponentInternalInstance, rawProps: Data | null, rawPrevProps: Data | null, optimized: boolean): void;+export declare function normalizePropsOptions(comp: ConcreteComponent, appContext: AppContext, asMixin?: boolean): NormalizedPropsOptions;+export {};packages/runtime-core/src/componentPublicInstance.d.tsnew file mode 100644index 000000000..f450dbcee@@ -0,0 +1,97 @@+import { type Attrs, type Component, type ComponentInternalInstance, type Data } from './component';+import { nextTick } from './scheduler';+import { type OnCleanup, type WatchOptions, type WatchStopHandle } from './apiWatch';+import { type IfAny, type Prettify, type UnionToIntersection } from '@vue/shared';+import { type ShallowUnwrapRef, type UnwrapNestedRefs } from '@vue/reactivity';+import { type ComponentInjectOptions, type ComponentOptionsBase, type ComponentOptionsMixin, type ComponentProvideOptions, type ComputedOptions, type ExtractComputedReturns, type InjectToObject, type MergedComponentOptionsOverride, type MethodOptions, type OptionTypesKeys, type OptionTypesType } from './componentOptions';+import type { EmitFn, EmitsOptions } from './componentEmits';+import type { SlotsType, UnwrapSlotsType } from './componentSlots';+import type { Directive } from './directives';+/**+ * Custom properties added to component instances in any way and can be accessed through `this`+ *+ * @example+ * Here is an example of adding a property `$router` to every component instance:+ * ```ts+ * import { createApp } from 'vue'+ * import { Router, createRouter } from 'vue-router'+ *+ * declare module 'vue' {+ *   interface ComponentCustomProperties {+ *     $router: Router+ *   }+ * }+ *+ * // effectively adding the router to every component instance+ * const app = createApp({})+ * const router = createRouter()+ * app.config.globalProperties.$router = router+ *+ * const vm = app.mount('#app')+ * // we can access the router from the instance+ * vm.$router.push('/')+ * ```+ */+export interface ComponentCustomProperties {+}+type IsDefaultMixinComponent<T> = T extends ComponentOptionsMixin ? ComponentOptionsMixin extends T ? true : false : false;+type MixinToOptionTypes<T> = T extends ComponentOptionsBase<infer P, infer B, infer D, infer C, infer M, infer Mixin, infer Extends, any, any, infer Defaults, any, any, any, any, any, any, any> ? OptionTypesType<P & {}, B & {}, D & {}, C & {}, M & {}, Defaults & {}> & IntersectionMixin<Mixin> & IntersectionMixin<Extends> : never;+type ExtractMixin<T> = {+    Mixin: MixinToOptionTypes<T>;+}[T extends ComponentOptionsMixin ? 'Mixin' : never];+export type IntersectionMixin<T> = IsDefaultMixinComponent<T> extends true ? OptionTypesType : UnionToIntersection<ExtractMixin<T>>;+export type UnwrapMixinsType<T, Type extends OptionTypesKeys> = T extends OptionTypesType ? T[Type] : never;+type EnsureNonVoid<T> = T extends void ? {} : T;+export type ComponentPublicInstanceConstructor<T extends ComponentPublicInstance<Props, RawBindings, D, C, M> = ComponentPublicInstance<any>, Props = any, RawBindings = any, D = any, C extends ComputedOptions = ComputedOptions, M extends MethodOptions = MethodOptions> = {+    __isFragment?: never;+    __isTeleport?: never;+    __isSuspense?: never;+    new (...args: any[]): T;+};+/**+ * @deprecated This is no longer used internally, but exported and relied on by+ * existing library types generated by vue-tsc.+ */+export type CreateComponentPublicInstance<P = {}, B = {}, D = {}, C extends ComputedOptions = {}, M extends MethodOptions = {}, Mixin extends ComponentOptionsMixin = ComponentOptionsMixin, Extends extends ComponentOptionsMixin = ComponentOptionsMixin, E extends EmitsOptions = {}, PublicProps = P, Defaults = {}, MakeDefaultsOptional extends boolean = false, I extends ComponentInjectOptions = {}, S extends SlotsType = {}, PublicMixin = IntersectionMixin<Mixin> & IntersectionMixin<Extends>, PublicP = UnwrapMixinsType<PublicMixin, 'P'> & EnsureNonVoid<P>, PublicB = UnwrapMixinsType<PublicMixin, 'B'> & EnsureNonVoid<B>, PublicD = UnwrapMixinsType<PublicMixin, 'D'> & EnsureNonVoid<D>, PublicC extends ComputedOptions = UnwrapMixinsType<PublicMixin, 'C'> & EnsureNonVoid<C>, PublicM extends MethodOptions = UnwrapMixinsType<PublicMixin, 'M'> & EnsureNonVoid<M>, PublicDefaults = UnwrapMixinsType<PublicMixin, 'Defaults'> & EnsureNonVoid<Defaults>> = ComponentPublicInstance<PublicP, PublicB, PublicD, PublicC, PublicM, E, PublicProps, PublicDefaults, MakeDefaultsOptional, ComponentOptionsBase<P, B, D, C, M, Mixin, Extends, E, string, Defaults, {}, string, S>, I, S>;+/**+ * This is the same as `CreateComponentPublicInstance` but adds local components,+ * global directives, exposed, and provide inference.+ * It changes the arguments order so that we don't need to repeat mixin+ * inference everywhere internally, but it has to be a new type to avoid+ * breaking types that relies on previous arguments order (#10842)+ */+export type CreateComponentPublicInstanceWithMixins<P = {}, B = {}, D = {}, C extends ComputedOptions = {}, M extends MethodOptions = {}, Mixin extends ComponentOptionsMixin = ComponentOptionsMixin, Extends extends ComponentOptionsMixin = ComponentOptionsMixin, E extends EmitsOptions = {}, PublicProps = P, Defaults = {}, MakeDefaultsOptional extends boolean = false, I extends ComponentInjectOptions = {}, S extends SlotsType = {}, LC extends Record<string, Component> = {}, Directives extends Record<string, Directive> = {}, Exposed extends string = string, TypeRefs extends Data = {}, TypeEl = any, Provide extends ComponentProvideOptions = ComponentProvideOptions, PublicMixin = IntersectionMixin<Mixin> & IntersectionMixin<Extends>, PublicP = UnwrapMixinsType<PublicMixin, 'P'> & EnsureNonVoid<P>, PublicB = UnwrapMixinsType<PublicMixin, 'B'> & EnsureNonVoid<B>, PublicD = UnwrapMixinsType<PublicMixin, 'D'> & EnsureNonVoid<D>, PublicC extends ComputedOptions = UnwrapMixinsType<PublicMixin, 'C'> & EnsureNonVoid<C>, PublicM extends MethodOptions = UnwrapMixinsType<PublicMixin, 'M'> & EnsureNonVoid<M>, PublicDefaults = UnwrapMixinsType<PublicMixin, 'Defaults'> & EnsureNonVoid<Defaults>> = ComponentPublicInstance<PublicP, PublicB, PublicD, PublicC, PublicM, E, PublicProps, PublicDefaults, MakeDefaultsOptional, ComponentOptionsBase<P, B, D, C, M, Mixin, Extends, E, string, Defaults, {}, string, S, LC, Directives, Exposed, Provide>, I, S, Exposed, TypeRefs, TypeEl>;+export type ExposedKeys<T, Exposed extends string & keyof T> = '' extends Exposed ? T : Pick<T, Exposed>;+export type ComponentPublicInstance<P = {}, // props type extracted from props option+B = {}, // raw bindings returned from setup()+D = {}, // return from data()+C extends ComputedOptions = {}, M extends MethodOptions = {}, E extends EmitsOptions = {}, PublicProps = {}, Defaults = {}, MakeDefaultsOptional extends boolean = false, Options = ComponentOptionsBase<any, any, any, any, any, any, any, any, any>, I extends ComponentInjectOptions = {}, S extends SlotsType = {}, Exposed extends string = '', TypeRefs extends Data = {}, TypeEl = any> = {+    $: ComponentInternalInstance;+    $data: D;+    $props: MakeDefaultsOptional extends true ? Partial<Defaults> & Omit<Prettify<P> & PublicProps, keyof Defaults> : Prettify<P> & PublicProps;+    $attrs: Attrs;+    $refs: Data & TypeRefs;+    $slots: UnwrapSlotsType<S>;+    $root: ComponentPublicInstance | null;+    $parent: ComponentPublicInstance | null;+    $host: Element | null;+    $emit: EmitFn<E>;+    $el: TypeEl;+    $options: Options & MergedComponentOptionsOverride;+    $forceUpdate: () => void;+    $nextTick: typeof nextTick;+    $watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, OnCleanup]) => any : (...args: [any, any, OnCleanup]) => any, options?: WatchOptions): WatchStopHandle;+} & ExposedKeys<IfAny<P, P, Readonly<Defaults> & Omit<P, keyof ShallowUnwrapRef<B> | keyof Defaults>> & ShallowUnwrapRef<B> & UnwrapNestedRefs<D> & ExtractComputedReturns<C> & M & ComponentCustomProperties & InjectToObject<I>, Exposed>;+export type PublicPropertiesMap = Record<string, (i: ComponentInternalInstance) => any>;+export declare const publicPropertiesMap: PublicPropertiesMap;+export interface ComponentRenderContext {+    [key: string]: any;+    _: ComponentInternalInstance;+}+export declare const isReservedPrefix: (key: string) => key is "_" | "$";+export declare const PublicInstanceProxyHandlers: ProxyHandler<any>;+export declare const RuntimeCompiledPublicInstanceProxyHandlers: ProxyHandler<any>;+export declare function createDevRenderContext(instance: ComponentInternalInstance): ComponentRenderContext;+export declare function exposePropsOnRenderContext(instance: ComponentInternalInstance): void;+export declare function exposeSetupStateOnRenderContext(instance: ComponentInternalInstance): void;+export {};packages/runtime-core/src/componentRenderContext.d.tsnew file mode 100644index 000000000..e9dbf440f@@ -0,0 +1,46 @@+import type { ComponentInternalInstance } from './component';+/**+ * mark the current rendering instance for asset resolution (e.g.+ * resolveComponent, resolveDirective) during render+ */+export declare let currentRenderingInstance: ComponentInternalInstance | null;+export declare let currentScopeId: string | null;+/**+ * Note: rendering calls maybe nested. The function returns the parent rendering+ * instance if present, which should be restored after the render is done:+ *+ * ```js+ * const prev = setCurrentRenderingInstance(i)+ * // ...render+ * setCurrentRenderingInstance(prev)+ * ```+ */+export declare function setCurrentRenderingInstance(instance: ComponentInternalInstance | null): ComponentInternalInstance | null;+/**+ * Set scope id when creating hoisted vnodes.+ * @private compiler helper+ */+export declare function pushScopeId(id: string | null): void;+/**+ * Technically we no longer need this after 3.0.8 but we need to keep the same+ * API for backwards compat w/ code generated by compilers.+ * @private+ */+export declare function popScopeId(): void;+/**+ * Only for backwards compat+ * @private+ */+export declare const withScopeId: (_id: string) => typeof withCtx;+export type ContextualRenderFn = {+    (...args: any[]): any;+    _n: boolean;+    _c: boolean;+    _d: boolean;+    _ns: boolean;+};+/**+ * Wrap a slot function to memoize current rendering instance+ * @private compiler helper+ */+export declare function withCtx(fn: Function, ctx?: ComponentInternalInstance | null, isNonScopedSlot?: boolean): Function;packages/runtime-core/src/componentRenderUtils.d.tsnew file mode 100644index 000000000..9a3add56e@@ -0,0 +1,7 @@+import { type ComponentInternalInstance } from './component';+import { type VNode, type VNodeArrayChildren } from './vnode';+export declare function markAttrsAccessed(): void;+export declare function renderComponentRoot(instance: ComponentInternalInstance): VNode;+export declare function filterSingleRoot(children: VNodeArrayChildren, recurse?: boolean): VNode | undefined;+export declare function shouldUpdateComponent(prevVNode: VNode, nextVNode: VNode, optimized?: boolean): boolean;+export declare function updateHOCHostEl({ vnode, parent, suspense }: ComponentInternalInstance, el: typeof vnode.el): void;packages/runtime-core/src/componentSlots.d.tsnew file mode 100644index 000000000..35da8d193@@ -0,0 +1,38 @@+import { type ComponentInternalInstance } from './component';+import { type VNode, type VNodeNormalizedChildren } from './vnode';+import { type IfAny, type Prettify, SlotFlags } from '@vue/shared';+export type Slot<T extends any = any> = (...args: IfAny<T, any[], [T] | (T extends undefined ? [] : never)>) => VNode[];+export type InternalSlots = {+    [name: string]: Slot | undefined;+};+export type Slots = Readonly<InternalSlots>;+declare const SlotSymbol: unique symbol;+export type SlotsType<T extends Record<string, any> = Record<string, any>> = {+    [SlotSymbol]?: T;+};+export type StrictUnwrapSlotsType<S extends SlotsType, T = NonNullable<S[typeof SlotSymbol]>> = [keyof S] extends [never] ? Slots : Readonly<T> & T;+export type UnwrapSlotsType<S extends SlotsType, T = NonNullable<S[typeof SlotSymbol]>> = [keyof S] extends [never] ? Slots : Readonly<Prettify<{+    [K in keyof T]: NonNullable<T[K]> extends (...args: any[]) => any ? T[K] : Slot<T[K]>;+}>>;+export type RawSlots = {+    [name: string]: unknown;+    $stable?: boolean;+    /**+     * for tracking slot owner instance. This is attached during+     * normalizeChildren when the component vnode is created.+     * @internal+     */+    _ctx?: ComponentInternalInstance | null;+    /**+     * indicates compiler generated slots+     * we use a reserved property instead of a vnode patchFlag because the slots+     * object may be directly passed down to a child component in a manual+     * render function, and the optimization hint need to be on the slot object+     * itself to be preserved.+     * @internal+     */+    _?: SlotFlags;+};+export declare const initSlots: (instance: ComponentInternalInstance, children: VNodeNormalizedChildren, optimized: boolean) => void;+export declare const updateSlots: (instance: ComponentInternalInstance, children: VNodeNormalizedChildren, optimized: boolean) => void;+export {};packages/runtime-core/src/components/BaseTransition.d.tsnew file mode 100644index 000000000..ef9b17bd2@@ -0,0 +1,60 @@+import { type ComponentInternalInstance } from '../component';+import { type VNode } from '../vnode';+import type { RendererElement } from '../renderer';+type Hook<T = () => void> = T | T[];+export declare const leaveCbKey: unique symbol;+declare const enterCbKey: unique symbol;+export interface BaseTransitionProps<HostElement = RendererElement> {+    mode?: 'in-out' | 'out-in' | 'default';+    appear?: boolean;+    persisted?: boolean;+    onBeforeEnter?: Hook<(el: HostElement) => void>;+    onEnter?: Hook<(el: HostElement, done: () => void) => void>;+    onAfterEnter?: Hook<(el: HostElement) => void>;+    onEnterCancelled?: Hook<(el: HostElement) => void>;+    onBeforeLeave?: Hook<(el: HostElement) => void>;+    onLeave?: Hook<(el: HostElement, done: () => void) => void>;+    onAfterLeave?: Hook<(el: HostElement) => void>;+    onLeaveCancelled?: Hook<(el: HostElement) => void>;+    onBeforeAppear?: Hook<(el: HostElement) => void>;+    onAppear?: Hook<(el: HostElement, done: () => void) => void>;+    onAfterAppear?: Hook<(el: HostElement) => void>;+    onAppearCancelled?: Hook<(el: HostElement) => void>;+}+export interface TransitionHooks<HostElement = RendererElement> {+    mode: BaseTransitionProps['mode'];+    persisted: boolean;+    beforeEnter(el: HostElement): void;+    enter(el: HostElement): void;+    leave(el: HostElement, remove: () => void): void;+    clone(vnode: VNode): TransitionHooks<HostElement>;+    afterLeave?(): void;+    delayLeave?(el: HostElement, earlyRemove: () => void, delayedLeave: () => void): void;+    delayedLeave?(): void;+}+export type TransitionHookCaller = <T extends any[] = [el: any]>(hook: Hook<(...args: T) => void> | undefined, args?: T) => void;+export type PendingCallback = (cancelled?: boolean) => void;+export interface TransitionState {+    isMounted: boolean;+    isLeaving: boolean;+    isUnmounting: boolean;+    leavingVNodes: Map<any, Record<string, VNode>>;+}+export interface TransitionElement {+    [enterCbKey]?: PendingCallback;+    [leaveCbKey]?: PendingCallback;+}+export declare function useTransitionState(): TransitionState;+export declare const BaseTransitionPropsValidators: Record<string, any>;+export declare const BaseTransition: {+    new (): {+        $props: BaseTransitionProps<any>;+        $slots: {+            default(): VNode[];+        };+    };+};+export declare function resolveTransitionHooks(vnode: VNode, props: BaseTransitionProps<any>, state: TransitionState, instance: ComponentInternalInstance, postClone?: (hooks: TransitionHooks) => void): TransitionHooks;+export declare function setTransitionHooks(vnode: VNode, hooks: TransitionHooks): void;+export declare function getTransitionRawChildren(children: VNode[], keepComment?: boolean, parentKey?: VNode['key']): VNode[];+export {};packages/runtime-core/src/components/KeepAlive.d.tsnew file mode 100644index 000000000..f0d456ac6@@ -0,0 +1,28 @@+import { type ComponentInternalInstance } from '../component';+import { type VNode, type VNodeProps } from '../vnode';+import { type ElementNamespace, type RendererElement, type RendererInternals, type RendererNode } from '../renderer';+import type { ComponentRenderContext } from '../componentPublicInstance';+type MatchPattern = string | RegExp | (string | RegExp)[];+export interface KeepAliveProps {+    include?: MatchPattern;+    exclude?: MatchPattern;+    max?: number | string;+}+export interface KeepAliveContext extends ComponentRenderContext {+    renderer: RendererInternals;+    activate: (vnode: VNode, container: RendererElement, anchor: RendererNode | null, namespace: ElementNamespace, optimized: boolean) => void;+    deactivate: (vnode: VNode) => void;+}+export declare const isKeepAlive: (vnode: VNode) => boolean;+export declare const KeepAlive: {+    __isKeepAlive: true;+    new (): {+        $props: VNodeProps & KeepAliveProps;+        $slots: {+            default(): VNode[];+        };+    };+};+export declare function onActivated(hook: Function, target?: ComponentInternalInstance | null): void;+export declare function onDeactivated(hook: Function, target?: ComponentInternalInstance | null): void;+export {};packages/runtime-core/src/components/Suspense.d.tsnew file mode 100644index 000000000..0c880e78f@@ -0,0 +1,69 @@+import { type VNode, type VNodeProps } from '../vnode';+import { type ComponentInternalInstance } from '../component';+import { type ElementNamespace, MoveType, type RendererElement, type RendererInternals, type RendererNode, type SetupRenderEffectFn } from '../renderer';+export interface SuspenseProps {+    onResolve?: () => void;+    onPending?: () => void;+    onFallback?: () => void;+    /**+     * Switch to fallback content if it takes longer than `timeout` milliseconds to render the new default content.+     * A `timeout` value of `0` will cause the fallback content to be displayed immediately when default content is replaced.+     */+    timeout?: string | number;+    /**+     * Allow suspense to be captured by parent suspense+     *+     * @default false+     */+    suspensible?: boolean;+}+export declare const isSuspense: (type: any) => boolean;+/**+ * For testing only+ */+export declare const resetSuspenseId: () => number;+export declare const SuspenseImpl: {+    name: string;+    __isSuspense: boolean;+    process(n1: VNode | null, n2: VNode, container: RendererElement, anchor: RendererNode | null, parentComponent: ComponentInternalInstance | null, parentSuspense: SuspenseBoundary | null, namespace: ElementNamespace, slotScopeIds: string[] | null, optimized: boolean, rendererInternals: RendererInternals): void;+    hydrate: typeof hydrateSuspense;+    normalize: typeof normalizeSuspenseChildren;+};+export declare const Suspense: {+    __isSuspense: true;+    new (): {+        $props: VNodeProps & SuspenseProps;+        $slots: {+            default(): VNode[];+            fallback(): VNode[];+        };+    };+};+export interface SuspenseBoundary {+    vnode: VNode<RendererNode, RendererElement, SuspenseProps>;+    parent: SuspenseBoundary | null;+    parentComponent: ComponentInternalInstance | null;+    namespace: ElementNamespace;+    container: RendererElement;+    hiddenContainer: RendererElement;+    activeBranch: VNode | null;+    isFallbackMountPending: boolean;+    pendingBranch: VNode | null;+    deps: number;+    pendingId: number;+    timeout: number;+    isInFallback: boolean;+    isHydrating: boolean;+    isUnmounted: boolean;+    effects: Function[];+    resolve(force?: boolean, sync?: boolean): void;+    fallback(fallbackVNode: VNode): void;+    move(container: RendererElement, anchor: RendererNode | null, type: MoveType): void;+    next(): RendererNode | null;+    registerDep(instance: ComponentInternalInstance, setupRenderEffect: SetupRenderEffectFn, optimized: boolean): void;+    unmount(parentSuspense: SuspenseBoundary | null, doRemove?: boolean): void;+}+declare function hydrateSuspense(node: Node, vnode: VNode, parentComponent: ComponentInternalInstance | null, parentSuspense: SuspenseBoundary | null, namespace: ElementNamespace, slotScopeIds: string[] | null, optimized: boolean, rendererInternals: RendererInternals, hydrateNode: (node: Node, vnode: VNode, parentComponent: ComponentInternalInstance | null, parentSuspense: SuspenseBoundary | null, slotScopeIds: string[] | null, optimized: boolean) => Node | null): Node | null;+declare function normalizeSuspenseChildren(vnode: VNode): void;+export declare function queueEffectWithSuspense(fn: Function | Function[], suspense: SuspenseBoundary | null): void;+export {};packages/runtime-core/src/components/Teleport.d.tsnew file mode 100644index 000000000..0811f3899@@ -0,0 +1,37 @@+import type { ComponentInternalInstance } from '../component';+import type { SuspenseBoundary } from './Suspense';+import { type ElementNamespace, type RendererElement, type RendererInternals, type RendererNode } from '../renderer';+import type { VNode, VNodeProps } from '../vnode';+export type TeleportVNode = VNode<RendererNode, RendererElement, TeleportProps>;+export interface TeleportProps {+    to: string | RendererElement | null | undefined;+    disabled?: boolean;+    defer?: boolean;+}+export declare const TeleportEndKey: unique symbol;+export declare const isTeleport: (type: any) => boolean;+export declare const TeleportImpl: {+    name: string;+    __isTeleport: boolean;+    process(n1: TeleportVNode | null, n2: TeleportVNode, container: RendererElement, anchor: RendererNode | null, parentComponent: ComponentInternalInstance | null, parentSuspense: SuspenseBoundary | null, namespace: ElementNamespace, slotScopeIds: string[] | null, optimized: boolean, internals: RendererInternals): void;+    remove(vnode: VNode, parentComponent: ComponentInternalInstance | null, parentSuspense: SuspenseBoundary | null, { um: unmount, o: { remove: hostRemove } }: RendererInternals, doRemove: boolean): void;+    move: typeof moveTeleport;+    hydrate: typeof hydrateTeleport;+};+export declare enum TeleportMoveTypes {+    TARGET_CHANGE = 0,+    TOGGLE = 1,// enable / disable+    REORDER = 2+}+declare function moveTeleport(vnode: VNode, container: RendererElement, parentAnchor: RendererNode | null, { o: { insert }, m: move }: RendererInternals, moveType?: TeleportMoveTypes): void;+declare function hydrateTeleport(node: Node, vnode: TeleportVNode, parentComponent: ComponentInternalInstance | null, parentSuspense: SuspenseBoundary | null, slotScopeIds: string[] | null, optimized: boolean, { o: { nextSibling, parentNode, querySelector, insert, createText }, }: RendererInternals<Node, Element>, hydrateChildren: (node: Node | null, vnode: VNode, container: Element, parentComponent: ComponentInternalInstance | null, parentSuspense: SuspenseBoundary | null, slotScopeIds: string[] | null, optimized: boolean) => Node | null): Node | null;+export declare const Teleport: {+    __isTeleport: true;+    new (): {+        $props: VNodeProps & TeleportProps;+        $slots: {+            default(): VNode[];+        };+    };+};+export {};packages/runtime-core/src/customFormatter.d.tsnew file mode 100644index 000000000..3c7ca823d@@ -0,0 +1 @@+export declare function initCustomFormatter(): void;packages/runtime-core/src/devtools.d.tsnew file mode 100644index 000000000..0d5ef4d1c@@ -0,0 +1,34 @@+import type { App } from './apiCreateApp';+import type { ComponentInternalInstance } from './component';+interface AppRecord {+    id: number;+    app: App;+    version: string;+    types: Record<string, string | Symbol>;+}+export interface DevtoolsHook {+    enabled?: boolean;+    emit: (event: string, ...payload: any[]) => void;+    on: (event: string, handler: Function) => void;+    once: (event: string, handler: Function) => void;+    off: (event: string, handler: Function) => void;+    appRecords: AppRecord[];+    /**+     * Added at https://github.com/vuejs/devtools/commit/f2ad51eea789006ab66942e5a27c0f0986a257f9+     * Returns whether the arg was buffered or not+     */+    cleanupBuffer?: (matchArg: unknown) => boolean;+}+export declare let devtools: DevtoolsHook;+export declare function setDevtoolsHook(hook: DevtoolsHook, target: any): void;+export declare function devtoolsInitApp(app: App, version: string): void;+export declare function devtoolsUnmountApp(app: App): void;+export declare const devtoolsComponentAdded: DevtoolsComponentHook;+export declare const devtoolsComponentUpdated: DevtoolsComponentHook;+export declare const devtoolsComponentRemoved: (component: ComponentInternalInstance) => void;+type DevtoolsComponentHook = (component: ComponentInternalInstance) => void;+export declare const devtoolsPerfStart: DevtoolsPerformanceHook;+export declare const devtoolsPerfEnd: DevtoolsPerformanceHook;+type DevtoolsPerformanceHook = (component: ComponentInternalInstance, type: string, time: number) => void;+export declare function devtoolsComponentEmit(component: ComponentInternalInstance, event: string, params: any[]): void;+export {};packages/runtime-core/src/directives.d.tsnew file mode 100644index 000000000..0b076fcfd@@ -0,0 +1,52 @@+/**+Runtime helper for applying directives to a vnode. Example usage:++const comp = resolveComponent('comp')+const foo = resolveDirective('foo')+const bar = resolveDirective('bar')++return withDirectives(h(comp), [+  [foo, this.x],+  [bar, this.y]+])+*/+import type { VNode } from './vnode';+import { type ComponentInternalInstance, type Data } from './component';+import type { ComponentPublicInstance } from './componentPublicInstance';+export interface DirectiveBinding<Value = any, Modifiers extends string = string, Arg = any> {+    instance: ComponentPublicInstance | Record<string, any> | null;+    value: Value;+    oldValue: Value | null;+    arg?: Arg;+    modifiers: DirectiveModifiers<Modifiers>;+    dir: ObjectDirective<any, Value, Modifiers, Arg>;+}+export type DirectiveHook<HostElement = any, Prev = VNode<any, HostElement> | null, Value = any, Modifiers extends string = string, Arg = any> = (el: HostElement, binding: DirectiveBinding<Value, Modifiers, Arg>, vnode: VNode<any, HostElement>, prevVNode: Prev) => void;+export type SSRDirectiveHook<Value = any, Modifiers extends string = string, Arg = any> = (binding: DirectiveBinding<Value, Modifiers, Arg>, vnode: VNode) => Data | undefined;+export interface ObjectDirective<HostElement = any, Value = any, Modifiers extends string = string, Arg = any> {+    /**+     * @internal without this, ts-expect-error in directives.test-d.ts somehow+     * fails when running tsc, but passes in IDE and when testing against built+     * dts. Could be a TS bug.+     */+    __mod?: Modifiers;+    created?: DirectiveHook<HostElement, null, Value, Modifiers, Arg>;+    beforeMount?: DirectiveHook<HostElement, null, Value, Modifiers, Arg>;+    mounted?: DirectiveHook<HostElement, null, Value, Modifiers, Arg>;+    beforeUpdate?: DirectiveHook<HostElement, VNode<any, HostElement>, Value, Modifiers, Arg>;+    updated?: DirectiveHook<HostElement, VNode<any, HostElement>, Value, Modifiers, Arg>;+    beforeUnmount?: DirectiveHook<HostElement, null, Value, Modifiers, Arg>;+    unmounted?: DirectiveHook<HostElement, null, Value, Modifiers, Arg>;+    getSSRProps?: SSRDirectiveHook<Value, Modifiers, Arg>;+    deep?: boolean;+}+export type FunctionDirective<HostElement = any, V = any, Modifiers extends string = string, Arg = any> = DirectiveHook<HostElement, any, V, Modifiers, Arg>;+export type Directive<HostElement = any, Value = any, Modifiers extends string = string, Arg = any> = ObjectDirective<HostElement, Value, Modifiers, Arg> | FunctionDirective<HostElement, Value, Modifiers, Arg>;+export type DirectiveModifiers<K extends string = string> = Partial<Record<K, boolean>>;+export declare function validateDirectiveName(name: string): void;+export type DirectiveArguments = Array<[Directive | undefined] | [Directive | undefined, any] | [Directive | undefined, any, any] | [Directive | undefined, any, any, DirectiveModifiers]>;+/**+ * Adds directives to a VNode.+ */+export declare function withDirectives<T extends VNode>(vnode: T, directives: DirectiveArguments): T;+export declare function invokeDirectiveHook(vnode: VNode, prevVNode: VNode | null, instance: ComponentInternalInstance | null, name: keyof ObjectDirective): void;packages/runtime-core/src/enums.d.tsnew file mode 100644index 000000000..01c74ef47@@ -0,0 +1,16 @@+export declare enum LifecycleHooks {+    BEFORE_CREATE = "bc",+    CREATED = "c",+    BEFORE_MOUNT = "bm",+    MOUNTED = "m",+    BEFORE_UPDATE = "bu",+    UPDATED = "u",+    BEFORE_UNMOUNT = "bum",+    UNMOUNTED = "um",+    DEACTIVATED = "da",+    ACTIVATED = "a",+    RENDER_TRIGGERED = "rtg",+    RENDER_TRACKED = "rtc",+    ERROR_CAPTURED = "ec",+    SERVER_PREFETCH = "sp"+}packages/runtime-core/src/errorHandling.d.tsnew file mode 100644index 000000000..5966ae7a4@@ -0,0 +1,24 @@+import type { ComponentInternalInstance } from './component';+import { LifecycleHooks } from './enums';+import { WatchErrorCodes } from '@vue/reactivity';+export declare enum ErrorCodes {+    SETUP_FUNCTION = 0,+    RENDER_FUNCTION = 1,+    NATIVE_EVENT_HANDLER = 5,+    COMPONENT_EVENT_HANDLER = 6,+    VNODE_HOOK = 7,+    DIRECTIVE_HOOK = 8,+    TRANSITION_HOOK = 9,+    APP_ERROR_HANDLER = 10,+    APP_WARN_HANDLER = 11,+    FUNCTION_REF = 12,+    ASYNC_COMPONENT_LOADER = 13,+    SCHEDULER = 14,+    COMPONENT_UPDATE = 15,+    APP_UNMOUNT_CLEANUP = 16+}+export declare const ErrorTypeStrings: Record<ErrorTypes, string>;+export type ErrorTypes = LifecycleHooks | ErrorCodes | WatchErrorCodes;+export declare function callWithErrorHandling(fn: Function, instance: ComponentInternalInstance | null | undefined, type: ErrorTypes, args?: unknown[]): any;+export declare function callWithAsyncErrorHandling(fn: Function | Function[], instance: ComponentInternalInstance | null, type: ErrorTypes, args?: unknown[]): any;+export declare function handleError(err: unknown, instance: ComponentInternalInstance | null | undefined, type: ErrorTypes, throwInDev?: boolean): void;packages/runtime-core/src/featureFlags.d.tsnew file mode 100644index 000000000..f25101a1d@@ -0,0 +1,6 @@+/**+ * This is only called in esm-bundler builds.+ * It is called when a renderer is created, in `baseCreateRenderer` so that+ * importing runtime-core is side-effects free.+ */+export declare function initFeatureFlags(): void;packages/runtime-core/src/h.d.tsnew file mode 100644index 000000000..e5600d3fd@@ -0,0 +1,48 @@+import { type Comment, type Fragment, type Text, type VNode, type VNodeArrayChildren, type VNodeProps } from './vnode';+import type { Teleport, TeleportProps } from './components/Teleport';+import type { Suspense, SuspenseProps } from './components/Suspense';+import { type IfAny } from '@vue/shared';+import type { RawSlots } from './componentSlots';+import type { Component, ComponentOptions, ConcreteComponent, FunctionalComponent } from './component';+import type { EmitsOptions } from './componentEmits';+import type { DefineComponent } from './apiDefineComponent';+type RawProps = VNodeProps & {+    __v_isVNode?: never;+    [Symbol.iterator]?: never;+} & Record<string, any>;+type RawChildren = string | number | boolean | VNode | VNodeArrayChildren | (() => any);+interface Constructor<P = any> {+    __isFragment?: never;+    __isTeleport?: never;+    __isSuspense?: never;+    new (...args: any[]): {+        $props: P;+    };+}+type HTMLElementEventHandler = {+    [K in keyof HTMLElementEventMap as `on${Capitalize<K>}`]?: (ev: HTMLElementEventMap[K]) => any;+};+export declare function h<K extends keyof HTMLElementTagNameMap>(type: K, children?: RawChildren): VNode;+export declare function h<K extends keyof HTMLElementTagNameMap>(type: K, props?: (RawProps & HTMLElementEventHandler) | null, children?: RawChildren | RawSlots): VNode;+export declare function h(type: string, children?: RawChildren): VNode;+export declare function h(type: string, props?: RawProps | null, children?: RawChildren | RawSlots): VNode;+export declare function h(type: typeof Text | typeof Comment, children?: string | number | boolean): VNode;+export declare function h(type: typeof Text | typeof Comment, props?: null, children?: string | number | boolean): VNode;+export declare function h(type: typeof Fragment, children?: VNodeArrayChildren): VNode;+export declare function h(type: typeof Fragment, props?: RawProps | null, children?: VNodeArrayChildren): VNode;+export declare function h(type: typeof Teleport, props: RawProps & TeleportProps, children: RawChildren | RawSlots): VNode;+export declare function h(type: typeof Suspense, children?: RawChildren): VNode;+export declare function h(type: typeof Suspense, props?: (RawProps & SuspenseProps) | null, children?: RawChildren | RawSlots): VNode;+export declare function h<P, E extends EmitsOptions = {}, S extends Record<string, any> = any>(type: FunctionalComponent<P, any, S, any>, props?: (RawProps & P) | ({} extends P ? null : never), children?: RawChildren | IfAny<S, RawSlots, S>): VNode;+export declare function h(type: Component, children?: RawChildren): VNode;+export declare function h<P>(type: ConcreteComponent | string, children?: RawChildren): VNode;+export declare function h<P>(type: ConcreteComponent<P> | string, props?: (RawProps & P) | ({} extends P ? null : never), children?: RawChildren): VNode;+export declare function h<P>(type: Component<P>, props?: (RawProps & P) | null, children?: RawChildren | RawSlots): VNode;+export declare function h<P>(type: ComponentOptions<P>, props?: (RawProps & P) | ({} extends P ? null : never), children?: RawChildren | RawSlots): VNode;+export declare function h(type: Constructor, children?: RawChildren): VNode;+export declare function h<P>(type: Constructor<P>, props?: (RawProps & P) | ({} extends P ? null : never), children?: RawChildren | RawSlots): VNode;+export declare function h(type: DefineComponent, children?: RawChildren): VNode;+export declare function h<P>(type: DefineComponent<P>, props?: (RawProps & P) | ({} extends P ? null : never), children?: RawChildren | RawSlots): VNode;+export declare function h(type: string | Component, children?: RawChildren): VNode;+export declare function h<P>(type: string | Component<P>, props?: (RawProps & P) | ({} extends P ? null : never), children?: RawChildren | RawSlots): VNode;+export {};packages/runtime-core/src/helpers/createSlots.d.tsnew file mode 100644index 000000000..f2cc31a21@@ -0,0 +1,13 @@+import type { VNode } from '../vnode';+type SSRSlot = (...args: any[]) => VNode[] | undefined;+interface CompiledSlotDescriptor {+    name: string;+    fn: SSRSlot;+    key?: string;+}+/**+ * Compiler runtime helper for creating dynamic slots object+ * @private+ */+export declare function createSlots(slots: Record<string, SSRSlot>, dynamicSlots: (CompiledSlotDescriptor | CompiledSlotDescriptor[] | undefined)[]): Record<string, SSRSlot>;+export {};packages/runtime-core/src/helpers/renderList.d.tsnew file mode 100644index 000000000..894275548@@ -0,0 +1,22 @@+import type { VNodeChild } from '../vnode';+/**+ * v-for string+ * @private+ */+export declare function renderList(source: string, renderItem: (value: string, index: number) => VNodeChild): VNodeChild[];+/**+ * v-for number+ */+export declare function renderList(source: number, renderItem: (value: number, index: number) => VNodeChild): VNodeChild[];+/**+ * v-for array+ */+export declare function renderList<T>(source: T[], renderItem: (value: T, index: number) => VNodeChild): VNodeChild[];+/**+ * v-for iterable+ */+export declare function renderList<T>(source: Iterable<T>, renderItem: (value: T, index: number) => VNodeChild): VNodeChild[];+/**+ * v-for object+ */+export declare function renderList<T>(source: T, renderItem: <K extends keyof T>(value: T[K], key: string, index: number) => VNodeChild): VNodeChild[];packages/runtime-core/src/helpers/renderSlot.d.tsnew file mode 100644index 000000000..fc2e686d4@@ -0,0 +1,9 @@+import type { Data } from '../component';+import type { Slots } from '../componentSlots';+import { type VNode, type VNodeArrayChildren } from '../vnode';+/**+ * Compiler runtime helper for rendering `<slot/>`+ * @private+ */+export declare function renderSlot(slots: Slots, name: string, props?: Data, fallback?: () => VNodeArrayChildren, noSlotted?: boolean, branchKey?: PropertyKey): VNode;+export declare function ensureValidVNode(vnodes: VNodeArrayChildren): VNodeArrayChildren | null;packages/runtime-core/src/helpers/resolveAssets.d.tsnew file mode 100644index 000000000..f42b9eeff@@ -0,0 +1,25 @@+import { type ConcreteComponent } from '../component';+import type { Directive } from '../directives';+import type { VNodeTypes } from '../vnode';+export declare const COMPONENTS = "components";+export declare const DIRECTIVES = "directives";+export declare const FILTERS = "filters";+export type AssetTypes = typeof COMPONENTS | typeof DIRECTIVES | typeof FILTERS;+/**+ * @private+ */+export declare function resolveComponent(name: string, maybeSelfReference?: boolean): ConcreteComponent | string;+export declare const NULL_DYNAMIC_COMPONENT: unique symbol;+/**+ * @private+ */+export declare function resolveDynamicComponent(component: unknown): VNodeTypes;+/**+ * @private+ */+export declare function resolveDirective(name: string): Directive | undefined;+/**+ * v2 compat only+ * @internal+ */+export declare function resolveFilter(name: string): Function | undefined;packages/runtime-core/src/helpers/toHandlers.d.tsnew file mode 100644index 000000000..3ab4eb52f@@ -0,0 +1,5 @@+/**+ * For prefixing keys in v-on="obj" with "on"+ * @private+ */+export declare function toHandlers(obj: Record<string, any>, preserveCaseIfNecessary?: boolean): Record<string, any>;packages/runtime-core/src/helpers/useId.d.tsnew file mode 100644index 000000000..0db91493d@@ -0,0 +1,9 @@+import { type ComponentInternalInstance } from '../component';+export declare function useId(): string;+/**+ * There are 3 types of async boundaries:+ * - async components+ * - components with async setup()+ * - components with serverPrefetch+ */+export declare function markAsyncBoundary(instance: ComponentInternalInstance): void;packages/runtime-core/src/helpers/useModel.d.tsnew file mode 100644index 000000000..459a11f72@@ -0,0 +1,3 @@+import type { DefineModelOptions, ModelRef } from '../apiSetupHelpers';+export declare function useModel<M extends PropertyKey, T extends Record<string, any>, K extends keyof T, G = T[K], S = T[K]>(props: T, name: K, options?: DefineModelOptions<T[K], G, S>): ModelRef<T[K], M, G, S>;+export declare const getModelModifiers: (props: Record<string, any>, modelName: string) => Record<string, boolean> | undefined;packages/runtime-core/src/helpers/useSsrContext.d.tsnew file mode 100644index 000000000..661ff82c3@@ -0,0 +1,2 @@+export declare const ssrContextKey: unique symbol;+export declare const useSSRContext: <T = Record<string, any>>() => T | undefined;packages/runtime-core/src/helpers/useTemplateRef.d.tsnew file mode 100644index 000000000..e0f0e72fa@@ -0,0 +1,6 @@+import { type ShallowRef } from '@vue/reactivity';+import { type Data } from '../component';+export declare const knownTemplateRefs: WeakSet<ShallowRef>;+export type TemplateRef<T = unknown> = Readonly<ShallowRef<T | null>>;+export declare function useTemplateRef<T = unknown, Keys extends string = string>(key: Keys): TemplateRef<T>;+export declare function isTemplateRefKey(refs: Data, key: string): boolean;packages/runtime-core/src/helpers/withMemo.d.tsnew file mode 100644index 000000000..e92d300c7@@ -0,0 +1,3 @@+import { type VNode } from '../vnode';+export declare function withMemo(memo: any[], render: () => VNode<any, any>, cache: any[], index: number): VNode<any, any>;+export declare function isMemoSame(cached: VNode, memo: any[]): boolean;packages/runtime-core/src/hmr.d.tsnew file mode 100644index 000000000..2556ba01b@@ -0,0 +1,16 @@+import { type ClassComponent, type ComponentInternalInstance, type ComponentOptions, type ConcreteComponent } from './component';+type HMRComponent = ComponentOptions | ClassComponent;+export declare let isHmrUpdating: boolean;+export declare const setHmrUpdating: (v: boolean) => boolean;+export declare const hmrDirtyComponents: Map<ConcreteComponent, Set<ComponentInternalInstance>>;+export interface HMRRuntime {+    createRecord: typeof createRecord;+    rerender: typeof rerender;+    reload: typeof reload;+}+export declare function registerHMR(instance: ComponentInternalInstance): void;+export declare function unregisterHMR(instance: ComponentInternalInstance): void;+declare function createRecord(id: string, initialDef: HMRComponent): boolean;+declare function rerender(id: string, newRender?: Function): void;+declare function reload(id: string, newComp: HMRComponent): void;+export {};packages/runtime-core/src/hydration.d.tsnew file mode 100644index 000000000..8990f7ab6@@ -0,0 +1,17 @@+import { type VNode } from './vnode';+import type { ComponentInternalInstance } from './component';+import { type RendererInternals } from './renderer';+import { type SuspenseBoundary } from './components/Suspense';+export type RootHydrateFunction = (vnode: VNode<Node, Element>, container: (Element | ShadowRoot) & {+    _vnode?: VNode;+}) => void;+export declare enum DOMNodeTypes {+    ELEMENT = 1,+    TEXT = 3,+    COMMENT = 8+}+export declare const isComment: (node: Node) => node is Comment;+export declare function createHydrationFunctions(rendererInternals: RendererInternals<Node, Element>): [+    RootHydrateFunction,+    (node: Node, vnode: VNode, parentComponent: ComponentInternalInstance | null, parentSuspense: SuspenseBoundary | null, slotScopeIds: string[] | null, optimized?: boolean) => Node | null+];packages/runtime-core/src/hydrationStrategies.d.tsnew file mode 100644index 000000000..edb4a8e4d@@ -0,0 +1,16 @@+/**+ * A lazy hydration strategy for async components.+ * @param hydrate - call this to perform the actual hydration.+ * @param forEachElement - iterate through the root elements of the component's+ *                         non-hydrated DOM, accounting for possible fragments.+ * @returns a teardown function to be called if the async component is unmounted+ *          before it is hydrated. This can be used to e.g. remove DOM event+ *          listeners.+ */+export type HydrationStrategy = (hydrate: () => void, forEachElement: (cb: (el: Element) => any) => void) => (() => void) | void;+export type HydrationStrategyFactory<Options> = (options?: Options) => HydrationStrategy;+export declare const hydrateOnIdle: HydrationStrategyFactory<number>;+export declare const hydrateOnVisible: HydrationStrategyFactory<IntersectionObserverInit>;+export declare const hydrateOnMediaQuery: HydrationStrategyFactory<string>;+export declare const hydrateOnInteraction: HydrationStrategyFactory<keyof HTMLElementEventMap | Array<keyof HTMLElementEventMap>>;+export declare function forEachElement(node: Node, cb: (el: Element) => void | false): void;packages/runtime-core/src/index.d.tsnew file mode 100644index 000000000..a85d9ed44@@ -0,0 +1,134 @@+export declare const version: string;+export { reactive, ref, readonly, unref, proxyRefs, isRef, toRef, toValue, toRefs, isProxy, isReactive, isReadonly, isShallow, customRef, triggerRef, shallowRef, shallowReactive, shallowReadonly, markRaw, toRaw, effect, stop, getCurrentWatcher, onWatcherCleanup, ReactiveEffect, effectScope, EffectScope, getCurrentScope, onScopeDispose, } from '@vue/reactivity';+export { computed } from './apiComputed';+export { watch, watchEffect, watchPostEffect, watchSyncEffect, } from './apiWatch';+export { onBeforeMount, onMounted, onBeforeUpdate, onUpdated, onBeforeUnmount, onUnmounted, onActivated, onDeactivated, onRenderTracked, onRenderTriggered, onErrorCaptured, onServerPrefetch, } from './apiLifecycle';+export { provide, inject, hasInjectionContext } from './apiInject';+export { nextTick } from './scheduler';+export { defineComponent } from './apiDefineComponent';+export { defineAsyncComponent } from './apiAsyncComponent';+export { useAttrs, useSlots } from './apiSetupHelpers';+export { useModel } from './helpers/useModel';+export { useTemplateRef, type TemplateRef } from './helpers/useTemplateRef';+export { useId } from './helpers/useId';+export { hydrateOnIdle, hydrateOnVisible, hydrateOnMediaQuery, hydrateOnInteraction, } from './hydrationStrategies';+export { defineProps, defineEmits, defineExpose, defineOptions, defineSlots, defineModel, withDefaults, type DefineProps, type ModelRef, type ComponentTypeEmits, } from './apiSetupHelpers';+/**+ * @internal+ */+export { mergeDefaults, mergeModels, createPropsRestProxy, withAsyncContext, } from './apiSetupHelpers';+export { getCurrentInstance } from './component';+export { h } from './h';+export { createVNode, cloneVNode, mergeProps, isVNode } from './vnode';+export { Fragment, Text, Comment, Static, type VNodeRef } from './vnode';+export { Teleport, type TeleportProps } from './components/Teleport';+export { Suspense, type SuspenseProps } from './components/Suspense';+export { KeepAlive, type KeepAliveProps } from './components/KeepAlive';+export { BaseTransition, BaseTransitionPropsValidators, type BaseTransitionProps, } from './components/BaseTransition';+export { withDirectives } from './directives';+export { useSSRContext, ssrContextKey } from './helpers/useSsrContext';+export { createRenderer, createHydrationRenderer } from './renderer';+export { queuePostFlushCb } from './scheduler';+import { warn as _warn } from './warning';+export declare const warn: typeof _warn;+/** @internal */+export { assertNumber } from './warning';+export { handleError, callWithErrorHandling, callWithAsyncErrorHandling, ErrorCodes, } from './errorHandling';+export { resolveComponent, resolveDirective, resolveDynamicComponent, } from './helpers/resolveAssets';+export { registerRuntimeCompiler, isRuntimeOnly } from './component';+export { useTransitionState, resolveTransitionHooks, setTransitionHooks, getTransitionRawChildren, } from './components/BaseTransition';+export { initCustomFormatter } from './customFormatter';+import { ErrorTypeStrings as _ErrorTypeStrings } from './errorHandling';+/**+ * Runtime error messages. Only exposed in dev or esm builds.+ * @internal+ */+export declare const ErrorTypeStrings: typeof _ErrorTypeStrings;+import { type DevtoolsHook, setDevtoolsHook as _setDevtoolsHook } from './devtools';+export declare const devtools: DevtoolsHook;+export declare const setDevtoolsHook: typeof _setDevtoolsHook;+import type { VNode } from './vnode';+import type { ComponentInternalInstance } from './component';+declare module '@vue/reactivity' {+    interface RefUnwrapBailTypes {+        runtimeCoreBailTypes: VNode | {+            $: ComponentInternalInstance;+        };+    }+}+export { TrackOpTypes, TriggerOpTypes } from '@vue/reactivity';+export type { Ref, MaybeRef, MaybeRefOrGetter, ToRef, ToRefs, UnwrapRef, ShallowRef, ShallowUnwrapRef, CustomRefFactory, ReactiveFlags, DeepReadonly, ShallowReactive, UnwrapNestedRefs, ComputedRef, WritableComputedRef, WritableComputedOptions, ComputedGetter, ComputedSetter, ReactiveEffectRunner, ReactiveEffectOptions, EffectScheduler, DebuggerOptions, DebuggerEvent, DebuggerEventExtraInfo, Raw, Reactive, } from '@vue/reactivity';+export type { MultiWatchSources, WatchEffect, WatchOptions, WatchEffectOptions as WatchOptionsBase, WatchCallback, WatchSource, WatchHandle, WatchStopHandle, } from './apiWatch';+export type { InjectionKey } from './apiInject';+export type { App, AppConfig, AppContext, Plugin, ObjectPlugin, FunctionPlugin, CreateAppFunction, OptionMergeFunction, } from './apiCreateApp';+export type { VNode, VNodeChild, VNodeTypes, VNodeProps, VNodeArrayChildren, VNodeNormalizedChildren, } from './vnode';+export type { Component, ConcreteComponent, FunctionalComponent, ComponentInternalInstance, Attrs, SetupContext, AllowedAttrs, ComponentCustomProps, AllowedComponentProps, GlobalComponents, GlobalDirectives, ComponentInstance, ComponentCustomElementInterface, } from './component';+export type { DefineComponent, DefineSetupFnComponent, PublicProps, } from './apiDefineComponent';+export type { ComponentOptions, ComponentOptionsMixin, ComponentCustomOptions, ComponentOptionsBase, ComponentProvideOptions, RenderFunction, MethodOptions, ComputedOptions, RuntimeCompilerOptions, ComponentInjectOptions, ComponentOptionsWithoutProps, ComponentOptionsWithArrayProps, ComponentOptionsWithObjectProps, } from './componentOptions';+export type { EmitsOptions, ObjectEmitsOptions, EmitsToProps, ShortEmitsToObject, EmitFn, } from './componentEmits';+export type { ComponentPublicInstance, ComponentCustomProperties, CreateComponentPublicInstance, CreateComponentPublicInstanceWithMixins, } from './componentPublicInstance';+export type { Renderer, RendererNode, RendererElement, HydrationRenderer, RendererOptions, RootRenderFunction, ElementNamespace, } from './renderer';+export type { RootHydrateFunction } from './hydration';+export type { Slot, Slots, SlotsType } from './componentSlots';+export type { Prop, PropType, ComponentPropsOptions, ComponentObjectPropsOptions, ExtractPropTypes, ExtractPublicPropTypes, ExtractDefaultPropTypes, } from './componentProps';+export type { Directive, DirectiveBinding, DirectiveHook, ObjectDirective, FunctionDirective, DirectiveModifiers, DirectiveArguments, } from './directives';+export type { SuspenseBoundary } from './components/Suspense';+export type { TransitionState, TransitionHooks, } from './components/BaseTransition';+export type { AsyncComponentOptions, AsyncComponentLoader, } from './apiAsyncComponent';+export type { HydrationStrategy, HydrationStrategyFactory, } from './hydrationStrategies';+export type { HMRRuntime } from './hmr';+export { withCtx, pushScopeId, popScopeId, withScopeId, } from './componentRenderContext';+export { renderList } from './helpers/renderList';+export { toHandlers } from './helpers/toHandlers';+export { renderSlot } from './helpers/renderSlot';+export { createSlots } from './helpers/createSlots';+export { withMemo, isMemoSame } from './helpers/withMemo';+export { openBlock, createBlock, setBlockTracking, createTextVNode, createCommentVNode, createStaticVNode, createElementVNode, createElementBlock, guardReactiveProps, } from './vnode';+export { toDisplayString, camelize, capitalize, toHandlerKey, normalizeProps, normalizeClass, normalizeStyle, } from '@vue/shared';+export { transformVNodeArgs } from './vnode';+import { createComponentInstance, getComponentPublicInstance, setupComponent } from './component';+import { renderComponentRoot } from './componentRenderUtils';+import { setCurrentRenderingInstance } from './componentRenderContext';+import { isVNode, normalizeVNode } from './vnode';+import { ensureValidVNode } from './helpers/renderSlot';+import { popWarningContext, pushWarningContext } from './warning';+declare const _ssrUtils: {+    createComponentInstance: typeof createComponentInstance;+    setupComponent: typeof setupComponent;+    renderComponentRoot: typeof renderComponentRoot;+    setCurrentRenderingInstance: typeof setCurrentRenderingInstance;+    isVNode: typeof isVNode;+    normalizeVNode: typeof normalizeVNode;+    getComponentPublicInstance: typeof getComponentPublicInstance;+    ensureValidVNode: typeof ensureValidVNode;+    pushWarningContext: typeof pushWarningContext;+    popWarningContext: typeof popWarningContext;+};+/**+ * SSR utils for \@vue/server-renderer. Only exposed in ssr-possible builds.+ * @internal+ */+export declare const ssrUtils: typeof _ssrUtils;+import { DeprecationTypes as _DeprecationTypes } from './compat/compatConfig';+export type { CompatVue } from './compat/global';+export type { LegacyConfig } from './compat/globalConfig';+import { warnDeprecation } from './compat/compatConfig';+import { createCompatVue } from './compat/global';+import { checkCompatEnabled, isCompatEnabled, softAssertCompatEnabled } from './compat/compatConfig';+import { resolveFilter as _resolveFilter } from './helpers/resolveAssets';+/**+ * @internal only exposed in compat builds+ */+export declare const resolveFilter: typeof _resolveFilter | null;+declare const _compatUtils: {+    warnDeprecation: typeof warnDeprecation;+    createCompatVue: typeof createCompatVue;+    isCompatEnabled: typeof isCompatEnabled;+    checkCompatEnabled: typeof checkCompatEnabled;+    softAssertCompatEnabled: typeof softAssertCompatEnabled;+};+/**+ * @internal only exposed in compat builds.+ */+export declare const compatUtils: typeof _compatUtils;+export declare const DeprecationTypes: typeof _DeprecationTypes;packages/runtime-core/src/internalObject.d.tsnew file mode 100644index 000000000..2485f05a2@@ -0,0 +1,2 @@+export declare const createInternalObject: () => any;+export declare const isInternalObject: (obj: object) => boolean;packages/runtime-core/src/profiling.d.tsnew file mode 100644index 000000000..10d311133@@ -0,0 +1,3 @@+import { type ComponentInternalInstance } from './component';+export declare function startMeasure(instance: ComponentInternalInstance, type: string): void;+export declare function endMeasure(instance: ComponentInternalInstance, type: string): void;packages/runtime-core/src/renderer.d.tsnew file mode 100644index 000000000..a45e9f415@@ -0,0 +1,100 @@+import { type VNode, type VNodeArrayChildren, type VNodeProps } from './vnode';+import { type ComponentInternalInstance, type LifecycleHook } from './component';+import { type SchedulerJobs } from './scheduler';+import { type CreateAppFunction } from './apiCreateApp';+import { type SuspenseBoundary } from './components/Suspense';+import { type RootHydrateFunction } from './hydration';+import { type TransitionHooks } from './components/BaseTransition';+export interface Renderer<HostElement = RendererElement> {+    render: RootRenderFunction<HostElement>;+    createApp: CreateAppFunction<HostElement>;+}+export interface HydrationRenderer extends Renderer<Element | ShadowRoot> {+    hydrate: RootHydrateFunction;+}+export type ElementNamespace = 'svg' | 'mathml' | undefined;+export type RootRenderFunction<HostElement = RendererElement> = (vnode: VNode | null, container: HostElement, namespace?: ElementNamespace) => void;+export interface RendererOptions<HostNode = RendererNode, HostElement = RendererElement> {+    patchProp(el: HostElement, key: string, prevValue: any, nextValue: any, namespace?: ElementNamespace, parentComponent?: ComponentInternalInstance | null): void;+    insert(el: HostNode, parent: HostElement, anchor?: HostNode | null): void;+    remove(el: HostNode): void;+    createElement(type: string, namespace?: ElementNamespace, isCustomizedBuiltIn?: string, vnodeProps?: (VNodeProps & {+        [key: string]: any;+    }) | null): HostElement;+    createText(text: string): HostNode;+    createComment(text: string): HostNode;+    setText(node: HostNode, text: string): void;+    setElementText(node: HostElement, text: string): void;+    parentNode(node: HostNode): HostElement | null;+    nextSibling(node: HostNode): HostNode | null;+    querySelector?(selector: string): HostElement | null;+    setScopeId?(el: HostElement, id: string): void;+    cloneNode?(node: HostNode): HostNode;+    insertStaticContent?(content: string, parent: HostElement, anchor: HostNode | null, namespace: ElementNamespace, start?: HostNode | null, end?: HostNode | null): [HostNode, HostNode];+}+export interface RendererNode {+    [key: string | symbol]: any;+}+export interface RendererElement extends RendererNode {+}+export interface RendererInternals<HostNode = RendererNode, HostElement = RendererElement> {+    p: PatchFn;+    um: UnmountFn;+    r: RemoveFn;+    m: MoveFn;+    mt: MountComponentFn;+    mc: MountChildrenFn;+    pc: PatchChildrenFn;+    pbc: PatchBlockChildrenFn;+    n: NextFn;+    o: RendererOptions<HostNode, HostElement>;+}+type PatchFn = (n1: VNode | null, // null means this is a mount+n2: VNode, container: RendererElement, anchor?: RendererNode | null, parentComponent?: ComponentInternalInstance | null, parentSuspense?: SuspenseBoundary | null, namespace?: ElementNamespace, slotScopeIds?: string[] | null, optimized?: boolean) => void;+type MountChildrenFn = (children: VNodeArrayChildren, container: RendererElement, anchor: RendererNode | null, parentComponent: ComponentInternalInstance | null, parentSuspense: SuspenseBoundary | null, namespace: ElementNamespace, slotScopeIds: string[] | null, optimized: boolean, start?: number) => void;+type PatchChildrenFn = (n1: VNode | null, n2: VNode, container: RendererElement, anchor: RendererNode | null, parentComponent: ComponentInternalInstance | null, parentSuspense: SuspenseBoundary | null, namespace: ElementNamespace, slotScopeIds: string[] | null, optimized: boolean) => void;+type PatchBlockChildrenFn = (oldChildren: VNode[], newChildren: VNode[], fallbackContainer: RendererElement, parentComponent: ComponentInternalInstance | null, parentSuspense: SuspenseBoundary | null, namespace: ElementNamespace, slotScopeIds: string[] | null) => void;+type MoveFn = (vnode: VNode, container: RendererElement, anchor: RendererNode | null, type: MoveType, parentSuspense?: SuspenseBoundary | null) => void;+type NextFn = (vnode: VNode) => RendererNode | null;+type UnmountFn = (vnode: VNode, parentComponent: ComponentInternalInstance | null, parentSuspense: SuspenseBoundary | null, doRemove?: boolean, optimized?: boolean) => void;+type RemoveFn = (vnode: VNode) => void;+export type MountComponentFn = (initialVNode: VNode, container: RendererElement, anchor: RendererNode | null, parentComponent: ComponentInternalInstance | null, parentSuspense: SuspenseBoundary | null, namespace: ElementNamespace, optimized: boolean) => void;+export type SetupRenderEffectFn = (instance: ComponentInternalInstance, initialVNode: VNode, container: RendererElement, anchor: RendererNode | null, parentSuspense: SuspenseBoundary | null, namespace: ElementNamespace, optimized: boolean) => void;+export declare enum MoveType {+    ENTER = 0,+    LEAVE = 1,+    REORDER = 2+}+export declare const queuePostRenderEffect: (fn: SchedulerJobs, suspense: SuspenseBoundary | null) => void;+/**+ * The createRenderer function accepts two generic arguments:+ * HostNode and HostElement, corresponding to Node and Element types in the+ * host environment. For example, for runtime-dom, HostNode would be the DOM+ * `Node` interface and HostElement would be the DOM `Element` interface.+ *+ * Custom renderers can pass in the platform specific types like this:+ *+ * ``` js+ * const { render, createApp } = createRenderer<Node, Element>({+ *   patchProp,+ *   ...nodeOps+ * })+ * ```+ */+export declare function createRenderer<HostNode = RendererNode, HostElement = RendererElement>(options: RendererOptions<HostNode, HostElement>): Renderer<HostElement>;+export declare function createHydrationRenderer(options: RendererOptions<Node, Element>): HydrationRenderer;+export declare function needTransition(parentSuspense: SuspenseBoundary | null, transition: TransitionHooks | null): boolean | null;+/**+ * #1156+ * When a component is HMR-enabled, we need to make sure that all static nodes+ * inside a block also inherit the DOM element from the previous tree so that+ * HMR updates (which are full updates) can retrieve the element for patching.+ *+ * #2080+ * Inside keyed `template` fragment static children, if a fragment is moved,+ * the children will always be moved. Therefore, in order to ensure correct move+ * position, el should be inherited from previous nodes.+ */+export declare function traverseStaticChildren(n1: VNode, n2: VNode, shallow?: boolean): void;+export declare function invalidateMount(hooks: LifecycleHook): void;+export {};packages/runtime-core/src/rendererTemplateRef.d.tsnew file mode 100644index 000000000..8d02a85d9@@ -0,0 +1,6 @@+import type { SuspenseBoundary } from './components/Suspense';+import type { VNode, VNodeNormalizedRef } from './vnode';+/**+ * Function for handling a template ref+ */+export declare function setRef(rawRef: VNodeNormalizedRef, oldRawRef: VNodeNormalizedRef | null, parentSuspense: SuspenseBoundary | null, vnode: VNode, isUnmount?: boolean): void;packages/runtime-core/src/scheduler.d.tsnew file mode 100644index 000000000..7f49bcf8e@@ -0,0 +1,44 @@+import { type ComponentInternalInstance } from './component';+export declare enum SchedulerJobFlags {+    QUEUED = 1,+    PRE = 2,+    /**+     * Indicates whether the effect is allowed to recursively trigger itself+     * when managed by the scheduler.+     *+     * By default, a job cannot trigger itself because some built-in method calls,+     * e.g. Array.prototype.push actually performs reads as well (#1740) which+     * can lead to confusing infinite loops.+     * The allowed cases are component update functions and watch callbacks.+     * Component update functions may update child component props, which in turn+     * trigger flush: "pre" watch callbacks that mutates state that the parent+     * relies on (#1801). Watch callbacks doesn't track its dependencies so if it+     * triggers itself again, it's likely intentional and it is the user's+     * responsibility to perform recursive state mutation that eventually+     * stabilizes (#1727).+     */+    ALLOW_RECURSE = 4,+    DISPOSED = 8+}+export interface SchedulerJob extends Function {+    id?: number;+    /**+     * flags can technically be undefined, but it can still be used in bitwise+     * operations just like 0.+     */+    flags?: SchedulerJobFlags;+    /**+     * Attached by renderer.ts when setting up a component's render effect+     * Used to obtain component information when reporting max recursive updates.+     */+    i?: ComponentInternalInstance;+}+export type SchedulerJobs = SchedulerJob | SchedulerJob[];+type CountMap = Map<SchedulerJob, number>;+export declare function nextTick(): Promise<void>;+export declare function nextTick<T, R>(this: T, fn: (this: T) => R | Promise<R>): Promise<R>;+export declare function queueJob(job: SchedulerJob): void;+export declare function queuePostFlushCb(cb: SchedulerJobs): void;+export declare function flushPreFlushCbs(instance?: ComponentInternalInstance, seen?: CountMap, i?: number): void;+export declare function flushPostFlushCbs(seen?: CountMap): void;+export {};packages/runtime-core/src/vnode.d.tsnew file mode 100644index 000000000..c6387d336@@ -0,0 +1,229 @@+import { type ClassComponent, type Component, type ComponentInternalInstance, type Data } from './component';+import type { RawSlots } from './componentSlots';+import { type ReactiveFlags, type Ref } from '@vue/reactivity';+import type { AppContext } from './apiCreateApp';+import { type Suspense, type SuspenseBoundary, type SuspenseImpl } from './components/Suspense';+import type { DirectiveBinding } from './directives';+import { type TransitionHooks } from './components/BaseTransition';+import { type Teleport, type TeleportImpl } from './components/Teleport';+import type { RendererElement, RendererNode } from './renderer';+import { NULL_DYNAMIC_COMPONENT } from './helpers/resolveAssets';+import type { ComponentPublicInstance } from './componentPublicInstance';+export declare const Fragment: {+    __isFragment: true;+    new (): {+        $props: VNodeProps;+    };+};+export declare const Text: unique symbol;+export declare const Comment: unique symbol;+export declare const Static: unique symbol;+export type VNodeTypes = string | VNode | Component | typeof Text | typeof Static | typeof Comment | typeof Fragment | typeof Teleport | typeof TeleportImpl | typeof Suspense | typeof SuspenseImpl;+export type VNodeRef = string | Ref | ((ref: Element | ComponentPublicInstance | null, refs: Record<string, any>) => void);+export type VNodeNormalizedRefAtom = {+    /**+     * component instance+     */+    i: ComponentInternalInstance;+    /**+     * Actual ref+     */+    r: VNodeRef;+    /**+     * setup ref key+     */+    k?: string;+    /**+     * refInFor marker+     */+    f?: boolean;+};+export type VNodeNormalizedRef = VNodeNormalizedRefAtom | VNodeNormalizedRefAtom[];+type VNodeMountHook = (vnode: VNode) => void;+type VNodeUpdateHook = (vnode: VNode, oldVNode: VNode) => void;+export type VNodeHook = VNodeMountHook | VNodeUpdateHook | VNodeMountHook[] | VNodeUpdateHook[];+export type VNodeProps = {+    key?: PropertyKey;+    ref?: VNodeRef;+    ref_for?: boolean;+    ref_key?: string;+    onVnodeBeforeMount?: VNodeMountHook | VNodeMountHook[];+    onVnodeMounted?: VNodeMountHook | VNodeMountHook[];+    onVnodeBeforeUpdate?: VNodeUpdateHook | VNodeUpdateHook[];+    onVnodeUpdated?: VNodeUpdateHook | VNodeUpdateHook[];+    onVnodeBeforeUnmount?: VNodeMountHook | VNodeMountHook[];+    onVnodeUnmounted?: VNodeMountHook | VNodeMountHook[];+};+type VNodeChildAtom = VNode | string | number | boolean | null | undefined | void;+export type VNodeArrayChildren = Array<VNodeArrayChildren | VNodeChildAtom>;+export type VNodeChild = VNodeChildAtom | VNodeArrayChildren;+export type VNodeNormalizedChildren = string | VNodeArrayChildren | RawSlots | null;+export interface VNode<HostNode = RendererNode, HostElement = RendererElement, ExtraProps = {+    [key: string]: any;+}> {+    /**+     * @internal+     */+    __v_isVNode: true;+    /**+     * @internal+     */+    [ReactiveFlags.SKIP]: true;+    type: VNodeTypes;+    props: (VNodeProps & ExtraProps) | null;+    key: PropertyKey | null;+    ref: VNodeNormalizedRef | null;+    /**+     * SFC only. This is assigned on vnode creation using currentScopeId+     * which is set alongside currentRenderingInstance.+     */+    scopeId: string | null;+    /**+     * SFC only. This is assigned to:+     * - Slot fragment vnodes with :slotted SFC styles.+     * - Component vnodes (during patch/hydration) so that its root node can+     *   inherit the component's slotScopeIds+     * @internal+     */+    slotScopeIds: string[] | null;+    children: VNodeNormalizedChildren;+    component: ComponentInternalInstance | null;+    dirs: DirectiveBinding[] | null;+    transition: TransitionHooks<HostElement> | null;+    el: HostNode | null;+    placeholder: HostNode | null;+    anchor: HostNode | null;+    target: HostElement | null;+    targetStart: HostNode | null;+    targetAnchor: HostNode | null;+    /**+     * number of elements contained in a static vnode+     * @internal+     */+    staticCount: number;+    suspense: SuspenseBoundary | null;+    /**+     * @internal+     */+    ssContent: VNode | null;+    /**+     * @internal+     */+    ssFallback: VNode | null;+    shapeFlag: number;+    patchFlag: number;+    /**+     * @internal+     */+    dynamicProps: string[] | null;+    /**+     * @internal+     */+    dynamicChildren: (VNode[] & {+        hasOnce?: boolean;+    }) | null;+    appContext: AppContext | null;+    /**+     * @internal lexical scope owner instance+     */+    ctx: ComponentInternalInstance | null;+    /**+     * @internal attached by v-memo+     */+    memo?: any[];+    /**+     * @internal index for cleaning v-memo cache+     */+    cacheIndex?: number;+    /**+     * @internal __COMPAT__ only+     */+    isCompatRoot?: true;+    /**+     * @internal custom element interception hook+     */+    ce?: (instance: ComponentInternalInstance) => void;+}+export declare const blockStack: VNode['dynamicChildren'][];+export declare let currentBlock: VNode['dynamicChildren'];+/**+ * Open a block.+ * This must be called before `createBlock`. It cannot be part of `createBlock`+ * because the children of the block are evaluated before `createBlock` itself+ * is called. The generated code typically looks like this:+ *+ * ```js+ * function render() {+ *   return (openBlock(),createBlock('div', null, [...]))+ * }+ * ```+ * disableTracking is true when creating a v-for fragment block, since a v-for+ * fragment always diffs its children.+ *+ * @private+ */+export declare function openBlock(disableTracking?: boolean): void;+export declare function closeBlock(): void;+export declare let isBlockTreeEnabled: number;+/**+ * Block tracking sometimes needs to be disabled, for example during the+ * creation of a tree that needs to be cached by v-once. The compiler generates+ * code like this:+ *+ * ``` js+ * _cache[1] || (+ *   setBlockTracking(-1, true),+ *   _cache[1] = createVNode(...),+ *   setBlockTracking(1),+ *   _cache[1]+ * )+ * ```+ *+ * @private+ */+export declare function setBlockTracking(value: number, inVOnce?: boolean): void;+/**+ * @private+ */+export declare function createElementBlock(type: string | typeof Fragment, props?: Record<string, any> | null, children?: any, patchFlag?: number, dynamicProps?: string[], shapeFlag?: number): VNode;+/**+ * Create a block root vnode. Takes the same exact arguments as `createVNode`.+ * A block root keeps track of dynamic nodes within the block in the+ * `dynamicChildren` array.+ *+ * @private+ */+export declare function createBlock(type: VNodeTypes | ClassComponent, props?: Record<string, any> | null, children?: any, patchFlag?: number, dynamicProps?: string[]): VNode;+export declare function isVNode(value: any): value is VNode;+export declare function isSameVNodeType(n1: VNode, n2: VNode): boolean;+declare let vnodeArgsTransformer: ((args: Parameters<typeof _createVNode>, instance: ComponentInternalInstance | null) => Parameters<typeof _createVNode>) | undefined;+/**+ * Internal API for registering an arguments transform for createVNode+ * used for creating stubs in the test-utils+ * It is *internal* but needs to be exposed for test-utils to pick up proper+ * typings+ */+export declare function transformVNodeArgs(transformer?: typeof vnodeArgsTransformer): void;+declare function createBaseVNode(type: VNodeTypes | ClassComponent | typeof NULL_DYNAMIC_COMPONENT, props?: (Data & VNodeProps) | null, children?: unknown, patchFlag?: number, dynamicProps?: string[] | null, shapeFlag?: number, isBlockNode?: boolean, needFullChildrenNormalization?: boolean): VNode;+export { createBaseVNode as createElementVNode };+export declare const createVNode: typeof _createVNode;+declare function _createVNode(type: VNodeTypes | ClassComponent | typeof NULL_DYNAMIC_COMPONENT, props?: (Data & VNodeProps) | null, children?: unknown, patchFlag?: number, dynamicProps?: string[] | null, isBlockNode?: boolean): VNode;+export declare function guardReactiveProps(props: (Data & VNodeProps) | null): (Data & VNodeProps) | null;+export declare function cloneVNode<T, U>(vnode: VNode<T, U>, extraProps?: (Data & VNodeProps) | null, mergeRef?: boolean, cloneTransition?: boolean): VNode<T, U>;+/**+ * @private+ */+export declare function createTextVNode(text?: string, flag?: number): VNode;+/**+ * @private+ */+export declare function createStaticVNode(content: string, numberOfNodes: number): VNode;+/**+ * @private+ */+export declare function createCommentVNode(text?: string, asBlock?: boolean): VNode;+export declare function normalizeVNode(child: VNodeChild): VNode;+export declare function cloneIfMounted(child: VNode): VNode;+export declare function normalizeChildren(vnode: VNode, children: unknown): void;+export declare function mergeProps(...args: (Data & VNodeProps)[]): Data;+export declare function invokeVNodeHook(hook: VNodeHook, instance: ComponentInternalInstance | null, vnode: VNode, prevVNode?: VNode | null): void;packages/runtime-core/src/warning.d.tsnew file mode 100644index 000000000..1c13bf15f@@ -0,0 +1,19 @@+import type { VNode } from './vnode';+import { type ConcreteComponent } from './component';+type ComponentVNode = VNode & {+    type: ConcreteComponent;+};+type TraceEntry = {+    vnode: ComponentVNode;+    recurseCount: number;+};+type ComponentTraceStack = TraceEntry[];+export declare function pushWarningContext(vnode: VNode): void;+export declare function popWarningContext(): void;+export declare function warn(msg: string, ...args: any[]): void;+export declare function getComponentTrace(): ComponentTraceStack;+/**+ * @internal+ */+export declare function assertNumber(val: unknown, type: string): void;+export {};packages/shared/src/codeframe.d.tsnew file mode 100644index 000000000..1b7551392@@ -0,0 +1 @@+export declare function generateCodeFrame(source: string, start?: number, end?: number): string;packages/shared/src/cssVars.d.tsnew file mode 100644index 000000000..182bed0ec@@ -0,0 +1,5 @@+/**+ * Normalize CSS var value created by `v-bind` in `<style>` block+ * See https://github.com/vuejs/core/pull/12461#issuecomment-2495804664+ */+export declare function normalizeCssVarValue(value: unknown): string;packages/shared/src/domAttrConfig.d.tsnew file mode 100644index 000000000..c1f8f9ab4@@ -0,0 +1,31 @@+export declare const isSpecialBooleanAttr: (key: string) => boolean;+/**+ * The full list is needed during SSR to produce the correct initial markup.+ */+export declare const isBooleanAttr: (key: string) => boolean;+/**+ * Boolean attributes should be included if the value is truthy or ''.+ * e.g. `<select multiple>` compiles to `{ multiple: '' }`+ */+export declare function includeBooleanAttr(value: unknown): boolean;+export declare function isSSRSafeAttrName(name: string): boolean;+export declare const propsToAttrMap: Record<string, string | undefined>;+/**+ * Known attributes, this is used for stringification of runtime static nodes+ * so that we don't stringify bindings that cannot be set from HTML.+ * Don't also forget to allow `data-*` and `aria-*`!+ * Generated from https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes+ */+export declare const isKnownHtmlAttr: (key: string) => boolean;+/**+ * Generated from https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute+ */+export declare const isKnownSvgAttr: (key: string) => boolean;+/**+ * Generated from https://developer.mozilla.org/en-US/docs/Web/MathML/Attribute+ */+export declare const isKnownMathMLAttr: (key: string) => boolean;+/**+ * Shared between server-renderer and runtime-core hydration logic+ */+export declare function isRenderableAttrValue(value: unknown): boolean;packages/shared/src/domTagConfig.d.tsnew file mode 100644index 000000000..a9ce370da@@ -0,0 +1,20 @@+/**+ * Compiler only.+ * Do NOT use in runtime code paths unless behind `__DEV__` flag.+ */+export declare const isHTMLTag: (key: string) => boolean;+/**+ * Compiler only.+ * Do NOT use in runtime code paths unless behind `__DEV__` flag.+ */+export declare const isSVGTag: (key: string) => boolean;+/**+ * Compiler only.+ * Do NOT use in runtime code paths unless behind `__DEV__` flag.+ */+export declare const isMathMLTag: (key: string) => boolean;+/**+ * Compiler only.+ * Do NOT use in runtime code paths unless behind `__DEV__` flag.+ */+export declare const isVoidTag: (key: string) => boolean;packages/shared/src/escapeHtml.d.tsnew file mode 100644index 000000000..a56e980ed@@ -0,0 +1,4 @@+export declare function escapeHtml(string: unknown): string;+export declare function escapeHtmlComment(src: string): string;+export declare const cssVarNameEscapeSymbolsRE: RegExp;+export declare function getEscapedCssVarName(key: string, doubleEscape: boolean): string;packages/shared/src/general.d.tsnew file mode 100644index 000000000..d30726412@@ -0,0 +1,63 @@+export declare const EMPTY_OBJ: {+    readonly [key: string]: any;+};+export declare const EMPTY_ARR: readonly never[];+export declare const NOOP: () => void;+/**+ * Always return false.+ */+export declare const NO: () => boolean;+export declare const isOn: (key: string) => boolean;+export declare const isModelListener: (key: string) => key is `onUpdate:${string}`;+export declare const extend: typeof Object.assign;+export declare const remove: <T>(arr: T[], el: T) => void;+export declare const hasOwn: (val: object, key: string | symbol) => key is keyof typeof val;+export declare const isArray: typeof Array.isArray;+export declare const isMap: (val: unknown) => val is Map<any, any>;+export declare const isSet: (val: unknown) => val is Set<any>;+export declare const isDate: (val: unknown) => val is Date;+export declare const isRegExp: (val: unknown) => val is RegExp;+export declare const isFunction: (val: unknown) => val is Function;+export declare const isString: (val: unknown) => val is string;+export declare const isSymbol: (val: unknown) => val is symbol;+export declare const isObject: (val: unknown) => val is Record<any, any>;+export declare const isPromise: <T = any>(val: unknown) => val is Promise<T>;+export declare const objectToString: typeof Object.prototype.toString;+export declare const toTypeString: (value: unknown) => string;+export declare const toRawType: (value: unknown) => string;+export declare const isPlainObject: (val: unknown) => val is object;+export declare const isIntegerKey: (key: unknown) => boolean;+export declare const isReservedProp: (key: string) => boolean;+export declare const isBuiltInDirective: (key: string) => boolean;+/**+ * @private+ */+export declare const camelize: (str: string) => string;+/**+ * @private+ */+export declare const hyphenate: (str: string) => string;+/**+ * @private+ */+export declare const capitalize: <T extends string>(str: T) => Capitalize<T>;+/**+ * @private+ */+export declare const toHandlerKey: <T extends string>(str: T) => T extends '' ? '' : `on${Capitalize<T>}`;+export declare const hasChanged: (value: any, oldValue: any) => boolean;+export declare const invokeArrayFns: (fns: Function[], ...arg: any[]) => void;+export declare const def: (obj: object, key: string | symbol, value: any, writable?: boolean) => void;+/**+ * "123-foo" will be parsed to 123+ * This is used for the .number modifier in v-model+ */+export declare const looseToNumber: (val: any) => any;+/**+ * Only concerns number-like strings+ * "123-foo" will be returned as-is+ */+export declare const toNumber: (val: any) => any;+export declare const getGlobalThis: () => any;+export declare function genPropsAccessExp(name: string): string;+export declare function genCacheKey(source: string, options: any): string;packages/shared/src/globalsAllowList.d.tsnew file mode 100644index 000000000..479334193@@ -0,0 +1,3 @@+export declare const isGloballyAllowed: (key: string) => boolean;+/** @deprecated use `isGloballyAllowed` instead */+export declare const isGloballyWhitelisted: (key: string) => boolean;packages/shared/src/index.d.tsnew file mode 100644index 000000000..6be0b0b0e@@ -0,0 +1,15 @@+export { makeMap } from './makeMap';+export * from './general';+export * from './patchFlags';+export * from './shapeFlags';+export * from './slotFlags';+export * from './globalsAllowList';+export * from './codeframe';+export * from './normalizeProp';+export * from './domTagConfig';+export * from './domAttrConfig';+export * from './escapeHtml';+export * from './looseEqual';+export * from './toDisplayString';+export * from './typeUtils';+export * from './cssVars';packages/shared/src/looseEqual.d.tsnew file mode 100644index 000000000..2cab22fe8@@ -0,0 +1,2 @@+export declare function looseEqual(a: any, b: any): boolean;+export declare function looseIndexOf(arr: any[], val: any): number;packages/shared/src/makeMap.d.tsnew file mode 100644index 000000000..89b5b442d@@ -0,0 +1,8 @@+/**+ * Make a map and return a function for checking if a key+ * is in that map.+ * IMPORTANT: all calls of this function must be prefixed with+ * \/\*#\_\_PURE\_\_\*\/+ * So that rollup can tree-shake them if necessary.+ */+export declare function makeMap(str: string): (key: string) => boolean;packages/shared/src/normalizeProp.d.tsnew file mode 100644index 000000000..9859643ce@@ -0,0 +1,6 @@+export type NormalizedStyle = Record<string, string | number>;+export declare function normalizeStyle(value: unknown): NormalizedStyle | string | undefined;+export declare function parseStringStyle(cssText: string): NormalizedStyle;+export declare function stringifyStyle(styles: NormalizedStyle | string | undefined): string;+export declare function normalizeClass(value: unknown): string;+export declare function normalizeProps(props: Record<string, any> | null): Record<string, any> | null;packages/shared/src/patchFlags.d.tsnew file mode 100644index 000000000..1352d55a0@@ -0,0 +1,115 @@+/**+ * Patch flags are optimization hints generated by the compiler.+ * when a block with dynamicChildren is encountered during diff, the algorithm+ * enters "optimized mode". In this mode, we know that the vdom is produced by+ * a render function generated by the compiler, so the algorithm only needs to+ * handle updates explicitly marked by these patch flags.+ *+ * Patch flags can be combined using the | bitwise operator and can be checked+ * using the & operator, e.g.+ *+ * ```js+ * const flag = TEXT | CLASS+ * if (flag & TEXT) { ... }+ * ```+ *+ * Check the `patchElement` function in '../../runtime-core/src/renderer.ts' to see how the+ * flags are handled during diff.+ */+export declare enum PatchFlags {+    /**+     * Indicates an element with dynamic textContent (children fast path)+     */+    TEXT = 1,+    /**+     * Indicates an element with dynamic class binding.+     */+    CLASS = 2,+    /**+     * Indicates an element with dynamic style+     * The compiler pre-compiles static string styles into static objects+     * + detects and hoists inline static objects+     * e.g. `style="color: red"` and `:style="{ color: 'red' }"` both get hoisted+     * as:+     * ```js+     * const style = { color: 'red' }+     * render() { return e('div', { style }) }+     * ```+     */+    STYLE = 4,+    /**+     * Indicates an element that has non-class/style dynamic props.+     * Can also be on a component that has any dynamic props (includes+     * class/style). when this flag is present, the vnode also has a dynamicProps+     * array that contains the keys of the props that may change so the runtime+     * can diff them faster (without having to worry about removed props)+     */+    PROPS = 8,+    /**+     * Indicates an element with props with dynamic keys. When keys change, a full+     * diff is always needed to remove the old key. This flag is mutually+     * exclusive with CLASS, STYLE and PROPS.+     */+    FULL_PROPS = 16,+    /**+     * Indicates an element that requires props hydration+     * (but not necessarily patching)+     * e.g. event listeners & v-bind with prop modifier+     */+    NEED_HYDRATION = 32,+    /**+     * Indicates a fragment whose children order doesn't change.+     */+    STABLE_FRAGMENT = 64,+    /**+     * Indicates a fragment with keyed or partially keyed children+     */+    KEYED_FRAGMENT = 128,+    /**+     * Indicates a fragment with unkeyed children.+     */+    UNKEYED_FRAGMENT = 256,+    /**+     * Indicates an element that only needs non-props patching, e.g. ref or+     * directives (onVnodeXXX hooks). since every patched vnode checks for refs+     * and onVnodeXXX hooks, it simply marks the vnode so that a parent block+     * will track it.+     */+    NEED_PATCH = 512,+    /**+     * Indicates a component with dynamic slots (e.g. slot that references a v-for+     * iterated value, or dynamic slot names).+     * Components with this flag are always force updated.+     */+    DYNAMIC_SLOTS = 1024,+    /**+     * Indicates a fragment that was created only because the user has placed+     * comments at the root level of a template. This is a dev-only flag since+     * comments are stripped in production.+     */+    DEV_ROOT_FRAGMENT = 2048,+    /**+     * SPECIAL FLAGS -------------------------------------------------------------+     * Special flags are negative integers. They are never matched against using+     * bitwise operators (bitwise matching should only happen in branches where+     * patchFlag > 0), and are mutually exclusive. When checking for a special+     * flag, simply check patchFlag === FLAG.+     */+    /**+     * Indicates a cached static vnode. This is also a hint for hydration to skip+     * the entire sub tree since static content never needs to be updated.+     */+    CACHED = -1,+    /**+     * A special flag that indicates that the diffing algorithm should bail out+     * of optimized mode. For example, on block fragments created by renderSlot()+     * when encountering non-compiler generated slots (i.e. manually written+     * render functions, which should always be fully diffed)+     * OR manually cloneVNodes+     */+    BAIL = -2+}+/**+ * dev only flag -> name mapping+ */+export declare const PatchFlagNames: Record<PatchFlags, string>;packages/shared/src/shapeFlags.d.tsnew file mode 100644index 000000000..39b1d89b6@@ -0,0 +1,13 @@+export declare enum ShapeFlags {+    ELEMENT = 1,+    FUNCTIONAL_COMPONENT = 2,+    STATEFUL_COMPONENT = 4,+    TEXT_CHILDREN = 8,+    ARRAY_CHILDREN = 16,+    SLOTS_CHILDREN = 32,+    TELEPORT = 64,+    SUSPENSE = 128,+    COMPONENT_SHOULD_KEEP_ALIVE = 256,+    COMPONENT_KEPT_ALIVE = 512,+    COMPONENT = 6+}packages/shared/src/slotFlags.d.tsnew file mode 100644index 000000000..753970d85@@ -0,0 +1,25 @@+export declare enum SlotFlags {+    /**+     * Stable slots that only reference slot props or context state. The slot+     * can fully capture its own dependencies so when passed down the parent won't+     * need to force the child to update.+     */+    STABLE = 1,+    /**+     * Slots that reference scope variables (v-for or an outer slot prop), or+     * has conditional structure (v-if, v-for). The parent will need to force+     * the child to update because the slot does not fully capture its dependencies.+     */+    DYNAMIC = 2,+    /**+     * `<slot/>` being forwarded into a child component. Whether the parent needs+     * to update the child is dependent on what kind of slots the parent itself+     * received. This has to be refined at runtime, when the child's vnode+     * is being created (in `normalizeChildren`)+     */+    FORWARDED = 3+}+/**+ * Dev only+ */+export declare const slotFlagsText: Record<SlotFlags, string>;packages/shared/src/toDisplayString.d.tsnew file mode 100644index 000000000..7369d90eb@@ -0,0 +1,5 @@+/**+ * For converting {{ interpolation }} values to displayed strings.+ * @private+ */+export declare const toDisplayString: (val: unknown) => string;packages/shared/src/typeUtils.d.tsnew file mode 100644index 000000000..f0b476996@@ -0,0 +1,18 @@+export type Prettify<T> = {+    [K in keyof T]: T[K];+} & {};+export type UnionToIntersection<U> = (U extends any ? (k: U) => void : never) extends (k: infer I) => void ? I : never;+export type LooseRequired<T> = {+    [P in keyof (T & Required<T>)]: T[P];+};+export type IfAny<T, Y, N> = 0 extends 1 & T ? Y : N;+export type IsKeyValues<T, K = string> = IfAny<T, false, T extends object ? (keyof T extends K ? true : false) : false>;+/**+ * Utility for extracting the parameters from a function overload (for typed emits)+ * https://github.com/microsoft/TypeScript/issues/32164#issuecomment-1146737709+ */+export type OverloadParameters<T extends (...args: any[]) => any> = Parameters<OverloadUnion<T>>;+type OverloadProps<TOverload> = Pick<TOverload, keyof TOverload>;+type OverloadUnionRecursive<TOverload, TPartialOverload = unknown> = TOverload extends (...args: infer TArgs) => infer TReturn ? TPartialOverload extends TOverload ? never : OverloadUnionRecursive<TPartialOverload & TOverload, TPartialOverload & ((...args: TArgs) => TReturn) & OverloadProps<TOverload>> | ((...args: TArgs) => TReturn) : never;+type OverloadUnion<TOverload extends (...args: any[]) => any> = Exclude<OverloadUnionRecursive<(() => never) & TOverload>, TOverload extends () => never ? never : () => never>;+export {}; 
Merged fix · PR #15097+22 −4
packages-private/dts-test/setupHelpers.test-d.tsindex 5ecc15443..067b81b03 100644@@ -1,4 +1,5 @@ import {+  type PropType,   type Ref,   type Slots,   type VNode,@@ -421,6 +422,18 @@ describe('defineModel', () => {   const countDefault = defineModel<number>('count', { default: 1 })   expectType<Ref<number>>(countDefault) +  const inferredNamedArrayDefault = defineModel('items', {+    type: Array as PropType<string[]>,+    default: () => [],+  })+  expectType<Ref<string[]>>(inferredNamedArrayDefault)++  const inferredArrayDefault = defineModel({+    type: Array as PropType<string[]>,+    default: () => [],+  })+  expectType<Ref<string[]>>(inferredArrayDefault)+   const arrayDefault = defineModel<number[]>({ default: () => [] })   expectType<Ref<number[]>>(arrayDefault) @@ -468,6 +481,11 @@ describe('defineModel', () => {    // @ts-expect-error type / default mismatch   defineModel<string>({ default: 123 })+  // @ts-expect-error runtime type / default mismatch+  defineModel('items', {+    type: Array as PropType<string[]>,+    default: () => [1],+  })   // @ts-expect-error raw array defaults must use a factory   defineModel<number[]>({ default: [] })   // @ts-expect-error raw object defaults must use a factorypackages/runtime-core/src/apiSetupHelpers.tsindex 7a1d2e3a2..f71616988 100644@@ -309,8 +309,8 @@ type DefineModelDefault<T> = InferDefault<Data, T>  * ```  */ export function defineModel<T, M extends PropertyKey = string, G = T, S = T>(-  options: ({ default: DefineModelDefault<T> } | { required: true }) &-    DefineModelRuntimeOptions<T, G, S>,+  options: DefineModelRuntimeOptions<T, G, S> &+    ({ default: DefineModelDefault<T> } | { required: true }), ): ModelRef<T, M, G, S>  export function defineModel<T, M extends PropertyKey = string, G = T, S = T>(@@ -319,8 +319,8 @@ export function defineModel<T, M extends PropertyKey = string, G = T, S = T>(  export function defineModel<T, M extends PropertyKey = string, G = T, S = T>(   name: string,-  options: ({ default: DefineModelDefault<T> } | { required: true }) &-    DefineModelRuntimeOptions<T, G, S>,+  options: DefineModelRuntimeOptions<T, G, S> &+    ({ default: DefineModelDefault<T> } | { required: true }), ): ModelRef<T, M, G, S>  export function defineModel<T, M extends PropertyKey = string, G = T, S = T>(