Skip to content

defineComponent (function syntax): exposed things loose typing and became any typeΒ #13965

@zfeher

Description

@zfeher

Vue version

3.5.22

Link to minimal reproduction

minimal repro

Steps to reproduce

1, open minimal repro and hoover over comp?.something} to see its inferred type (any)

2, open Comp.ts, find SomethingT and hoover over to see the inferred type (`any).

What is expected?

The type of comp.something should be 'something' literal type like in its definition.

What is actually happening?

The type of comp.something is any.
See compB.something (options syntax) which works correctly.

System Info

Any additional comments?

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions