Skip to content

Commit c39f562

Browse files
davidmatterso1ve
andauthored
test: global components prop validation (#4542)
Co-authored-by: Ray <[email protected]>
1 parent 71ad9c4 commit c39f562

File tree

4 files changed

+32
-0
lines changed

4 files changed

+32
-0
lines changed
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<template>
2+
<div>{{ asdf }}</div>
3+
</template>
4+
5+
<script lang="ts" setup>
6+
defineProps<{
7+
asdf: number
8+
}>()
9+
</script>
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import type globalcomp from './globalcomp.vue';
2+
3+
declare module 'vue' {
4+
export interface GlobalComponents {
5+
globalcomp: typeof globalcomp
6+
}
7+
}
8+
9+
export { };

test-workspace/tsc/#4503/main.vue

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<script setup lang="ts"></script>
2+
3+
<template>
4+
<!-- @vue-expect-error -->
5+
<globalcomp asdf="somestring"></globalcomp>
6+
</template>
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"extends": "../../tsconfig.json",
3+
"include": [ "**/*" ],
4+
"compilerOptions": {
5+
"checkJs": true,
6+
"strict": true,
7+
},
8+
}

0 commit comments

Comments
 (0)