Closed
Description
Vue version
3.5.13
Link to minimal reproduction
Steps to reproduce
- Open the linked playground
- Make sure that
strictFunctionTypes
is set totrue
intsconfig.json
- Hover over types in App.vue setup block
What is expected?
ComponentInstance<typeof Comp>['$props']
should evaluate to object describing Comp
's props. It should not contain $
-prefixed properties:
type ExpectedProps = {
readonly visible: boolean;
readonly "onUpdate:visible"?: (value: boolean) => any;
key?: PropertyKey;
ref?: VNodeRef;
ref_for?: boolean;
ref_key?: string;
onVnodeBeforeMount?: VNodeMountHook | VNodeMountHook[];
... 6 more ...;
style?: unknown;
}
What is actually happening?
ComponentInstance<typeof Comp>['$props']
evaluates to object containing $
-prefixed properties such as
type ActualProps = {
$: ComponentInternalInstance;
$data: {};
$props: Partial<{}> & Omit<{
readonly visible?: boolean;
readonly "onUpdate:visible"?: (value: boolean) => any;
} & VNodeProps & AllowedComponentProps & ComponentCustomProps, never>;
... 25 more ...;
style?: unknown;
}
System Info
Any additional comments?
Seems to be related to defineModel
because the bug is not triggered when I'm not using it