Skip to content

unable to infer ComponentPropsOptions type from component #11853

Closed
@guy-confetti

Description

@guy-confetti

Vue version

3.5.3

Link to minimal reproduction

https://play.vuejs.org/#eNp9U01v2zAM/SuELm2BIDsUuxhJhnXrYQPWFWuOAgY3pjN1MqVRUtY0yH8vJTeumxa9yOLj44ce6Z367P10k1BVahZWbHyEgDF5sDWt51rFoNVCk+m84wg7aLA1hF+c2IQUJxC3HuHrSxT20LLr4EQSn2jStHIUIvzYPjPmx5lOd5oAPDsfKih3gNa54Q6lUgU3kQ2tJweQ8V8yjE0FkRM+wfun723Nr+IvnLNY05BA2qiTjRW0tQ14HP/wKv4qdbfIb9Qv8S8a6M9eztOzQyIWmykD8wVQsrZQNe3PslJFzkGU6yzHbLkQuZaA9xGpCcdizwy1yFCoE6hpW44FfOohqIBwgzwkH02hJ8yP62Waa8dE2YDZh3495CpGxM7bOmJxjAw1kY2RabdmPb0LjmStyrO1WkkuY5F/+mhkG7QalNWqttb9/16w0RQl5g+u/r6B34X7jGl1zRiQN6jV4Is1rzH27subKxFt5Oxck6yw33H+wuBsyj32tItEjbQ94pVuv5UfQjZxGS7zXMLhUbnRw0RFjd8iffaJEOfTj9NztX8E6OAk3g==

Steps to reproduce

minimal reproduction shows inferred props type returns the component's ExtractPropTypes

What is expected?

should be able to infer ComponentPropsOptions

What is actually happening?

until updating to v3.5, I've been using this snippet to infer public prop types from components

type ComponentProps<T> =
  T extends DefineComponent<infer Props, any, any>
    ? ExtractPublicPropTypes<Props>
    : never

but Props are now already extracted with ExtractPropTypes and I'm unable to infer ComponentPropsOptions to extract the public props

System Info

No response

Any additional comments?

I was unable to find the relevant commit, but I think this change was already introduced in 3.4

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