Skip to content

Commit 3f52737

Browse files
committed
add two components. 'npm run build' now fails with 'error TS2604: JSX element type 'SecondComponent' does not have any construct or call signatures.'
1 parent 18a36be commit 3f52737

File tree

3 files changed

+40
-0
lines changed

3 files changed

+40
-0
lines changed

src/components/FirstComponent.vue

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
<template>
2+
<div>
3+
<div>first component!</div>
4+
<second-component v-if="show"/>
5+
</div>
6+
7+
</template>
8+
9+
<script lang="ts">
10+
import Vue from 'vue'
11+
import SecondComponent from './SecondComponent.vue'
12+
13+
const mixin = {
14+
props: {
15+
show: {
16+
type: Boolean
17+
}
18+
}
19+
};
20+
21+
export default Vue.extend({
22+
components: {
23+
SecondComponent
24+
},
25+
mixins: [mixin]
26+
})
27+
</script>

src/components/HelloWorld.vue

+2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<script setup lang="ts">
2+
import FirstComponent from './FirstComponent.vue'
23
defineProps<{
34
msg: string
45
}>()
@@ -12,6 +13,7 @@ defineProps<{
1213
<a target="_blank" href="https://vitejs.dev/">Vite</a> +
1314
<a target="_blank" href="https://v2.vuejs.org/">Vue 2</a>. What's next?
1415
</h3>
16+
<first-component :show="true"/>
1517
</div>
1618
</template>
1719

src/components/SecondComponent.vue

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<template>
2+
<div>second component!</div>
3+
</template>
4+
5+
<script lang="ts">
6+
import Vue from 'vue'
7+
8+
export default Vue.extend({
9+
10+
})
11+
</script>

0 commit comments

Comments
 (0)