Skip to content

variables declaration after defineProps is ignored #7460

@huang-julien

Description

@huang-julien

Vue version

3.2.45

Link to minimal reproduction

https://sfc.vuejs.org/#__DEV__eNqdkUtrg0AQx7/KsJe0EN27qBB66SHQ3rs9WB0Tg/tgdjUH8bt3Vi2kLbSQPf3n9ZvHTuLgXDoOKDKRB9SurwKWygC/vOnGTS7mk9UOztj3tlDiaqlvlABZAmzpcs3P5Q2HTV9T5wJ4DIODvjInrg5eCY522lkKsIBbshqUSGW04kRKRNZaXYq9WJMTXbn04q3hgafYWG0BJmaweKJvqc9YnENwPpPSt3WEXnxq6SRZpTSY0GlM0evkg+zVIzFYif0NQ7JzREoITYOE9BfzR+ovbsTOysy8yteK/x99mtaLwzxHHdAHlncfvLaGAYxdoDMU0GDbGXwl6/zD225x794f92ungpd9PhyPL9//Yv4E5tm9dg==

Steps to reproduce

  • HALLO should be shown after "world"

If you move defineProps after test, "HALLO" should be visible.
const test = "HALLO", {hello} = defineProps(['hello'])

Seems like the compiler is ignoring any declaration after defineProps

What is expected?

HALLO should be shown after "world"

What is actually happening?

HALLO is not shown

System Info

No response

Any additional comments?

original issue : nuxt nuxt/nuxt.js#12497
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