You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
svelte/test/runtime/samples/object-rest/main.html

18 lines
253 B

<pre>{JSON.stringify(props)}</pre>
<script>
export default {
data: () => ({
unwanted: 1,
wanted: 2
}),
helpers: {
// prevent this being mixed in with data
JSON
},
computed: {
props: ({ unwanted, ...x }) => x
}
};
</script>