Skip to content

Type-only defineProps compiles global types incorrectly #11014

Open
@NonSpicyBurrito

Description

@NonSpicyBurrito

Vue version

3.4.27

Link to minimal reproduction

https://play.vuejs.org/#eNp9kd9LwzAQx/+VkCeF0YEKwugGKntQcA71MSBde6uZ6SXkR+0Y/d+9pKzuYewtd9/v3X3ucuAPxmRtAD7juSutNJ458MEwVWA9F9w7wRcCKyhVYYHVSm8KxQ4CGfN7A+x1vwrNBiybM0wPgb3AWLCVCGurjcuTm9TZ6CbT4upaYD4dZtIECjw0RhUeKMqnJwGfEEapcSvrbOc0EmtqKXipGyMV2DfjpUZCnQ1oUSuU0r8vKedtgMkxX35D+XMmv3NdzAm+tuDAtiD4qPnC1uAHefmxgo7eo9joKihyXxDfwWkVIuNgewxYEfaJL9E+N0ZbL7H+dMvOA7rjUhE0OvvkF5w+7OnC6v+4t9ldqqOD0xW/WrCxJx2QhOzmnvd/D5eq1g==

Steps to reproduce

See compiled JS in playground.

What is expected?

num compiles to { type: Number, required: true }.

What is actually happening?

num compiles to { type: null, required: true }.

System Info

No response

Any additional comments?

The issue occurs with any global type, whether it's in declare global {}, in *.d.ts, or in global types.

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