Skip to content

Instantly share code, notes, and snippets.

@jcppman
Last active November 18, 2021 16:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jcppman/ce77978d2792f086a7b0e5abb3cc0313 to your computer and use it in GitHub Desktop.
Save jcppman/ce77978d2792f086a7b0e5abb3cc0313 to your computer and use it in GitHub Desktop.
Repro of volar issue #704
<script lang="ts">
import { defineComponent } from 'vue';
import SubComponent from './Sub.vue';
export default defineComponent({
components: {
SubComponent,
},
setup() {
function handleChange(n: number) {
console.log(n);
}
return {
handleChange,
};
},
});
</script>
<template>
<sub-component @change="handleChange" />
</template>
<script lang="ts">
import { defineComponent } from 'vue';
export default defineComponent({
emits: {
change(n: boolean) {
return true;
},
},
props: {
a: {
type: String,
required: false,
},
},
setup(props) {},
});
</script>
<template>
Sub
</template>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment