Props destructure with rest operator doesn't seem to work on 3.5.0-alpha.2 (original) (raw)

Skip to content

Sign in

Appearance settings

View all features

View all solutions

View all resources

Provide feedback

We read every piece of feedback, and take your input very seriously.

Include my email address so I can be contacted

Saved searches

Use saved searches to filter your results more quickly

Sign in

Sign up

Appearance settings

vuejs / core Public

Additional navigation options

Closed

#10888

Closed

Props destructure with rest operator doesn't seem to work on 3.5.0-alpha.2

#10885

#10888

Labels

🐞 bugSomething isn't workingscope: script-setup

@ByScripts

Description

@ByScripts

ByScripts

opened

on May 7, 2024

Vue version

3.5.0-alpha.2

https://play.vuejs.org/#eNqVUk1P4zAQ/SsjX2ilrrvaai/dtBJddaXlAAg4WkImnaQBx7Zsp1Sq8t+ZSQkEBEjc7Hlvvt6bgzj1Xu4aFHORJay90QmXymZ/Xe2hcG6hxKkScKcDvVb0mjI6HVDpG/NQ+QRG25JYKRItYmo8oVXtXUhwLBdcDSdyyh/uefKHSx2TiSomlJo7W1SlvI/O0kgHZQGUyCmhMhgufKqcpfJz6BDGtDHu8ayLpdDgpI/nW8wfPojfxz3HlLgMGDHsUIkXLOlQYjrC6+tz3NP7BazdpjHE/gK8wuhMwzMeaavGbmjsAa+b9n+nSWXLm7jeJ7SxX4oHZWbb8ZUgjVirz1Z/HXcmZ12esi2p2Ov7zlNOyjbVbvnPOapyYHuhbbMpxwbwSocOJn2SJOMHnO8bf4BHnfLtuigwT9A+38Cz+cqS3ZFJNMoEpJTck1gL2GBRWbwMzsesW5gYc4gpkGyUCXyR/Z+2Xo7GXG7QazQaw2IJ3MAZlMaVo36hMXHf3t3tDgO7QIrN5G/584c2fqvlL9E+Ae+UCm8=

Steps to reproduce

Just take a look at Comp.vue

What is expected?

Output should be:

Foo: A Bar: B

What is actually happening?

rest doesn't exist in the template (Cannot read properties of undefined (reading 'bar'))

But console.log(rest.bar) works in <script setup>

System Info

No response

Any additional comments?

No response

Metadata

Metadata

Assignees

No one assigned

Labels

🐞 bugSomething isn't workingscope: script-setup

Type

No type

Fields

Give feedback

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions